• R/O
  • SSH
  • HTTPS

owata: Commit


Commit MetaInfo

Revision150 (tree)
Time2008-08-29 14:55:20
Authorbird_may_nike

Log Message

vplを増やす

Change Summary

Incremental Difference

--- trunc/src/psp2ch.c (revision 149)
+++ trunc/src/psp2ch.c (revision 150)
@@ -31,7 +31,7 @@
3131 extern RECT titleDstRectH; // pg.c
3232 extern RECT titleDstRectV; // pg.c
3333
34-char* ver = "0.8.2";
34+char* ver = "0.8.3";
3535 S_2CH s2ch;
3636 char keyWords[128];
3737
--- trunc/src/psp2chNet.c (revision 149)
+++ trunc/src/psp2chNet.c (revision 150)
@@ -531,11 +531,13 @@
531531 return -1;
532532 }
533533 *q = '\0';
534+ /*
534535 pgPrintMenuBar(line);
535536 pgWaitVn(10);
536537 pgCopyMenuBar();
537538 sceDisplayWaitVblankStart();
538539 framebuffer = sceGuSwapBuffers();
540+ */
539541 if (strstr(line, "Content-Length:"))
540542 {
541543 sscanf(line, "Content-Length: %d", &contentLength);
--- trunc/src/psp2chImageView.c (revision 149)
+++ trunc/src/psp2chImageView.c (revision 150)
@@ -16,7 +16,8 @@
1616 extern unsigned short winPixels[BUF_WIDTH*BUF_HEIGHT*2]; // pg.c
1717 extern int preLine; // psp2chRes.c
1818
19-#define MEM_SIZE 8*1024*1024
19+#define MEM_SIZE 14*1024*1024
20+#define EX_MEMORRY (0x0a000000)
2021 /*****************************
2122 矩形範囲を拡大縮小
2223 *****************************/
@@ -369,11 +370,6 @@
369370 unsigned char header[4];
370371 SceUID vpl;
371372
372- vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
373- if (vpl < 0)
374- {
375- return -1;
376- }
377373 infile = fopen(fname, "rb" );
378374 if (!infile)
379375 {
@@ -395,11 +391,16 @@
395391 // Gu転送のため1行を16バイト境界にそろえる
396392 width = (cinfo.output_width + 15) & 0xFFFFFFF0;
397393 height = cinfo.output_height;
394+ vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
395+ if (vpl < 0)
396+ {
397+ return -3;
398+ }
398399 if (sceKernelAllocateVpl(vpl, sizeof(JSAMPROW) * height, &mem, NULL) < 0)
399400 {
400401 sceKernelDeleteVpl(vpl);
401402 fclose(infile);
402- return -3;
403+ return -4;
403404 }
404405 img = mem;
405406 if (sceKernelAllocateVpl(vpl, sizeof(JSAMPLE) * 3 * width, &mem, NULL) < 0)
@@ -406,7 +407,7 @@
406407 {
407408 sceKernelDeleteVpl(vpl);
408409 fclose(infile);
409- return -4;
410+ return -5;
410411 }
411412 buf = mem;
412413 if (sceKernelAllocateVpl(vpl, sizeof(JSAMPLE) * 4 * width * height + 16, &mem, NULL) < 0)
@@ -413,7 +414,7 @@
413414 {
414415 sceKernelDeleteVpl(vpl);
415416 fclose(infile);
416- return -5;
417+ return -6;
417418 }
418419 imgbuf = (JSAMPROW)(((int)mem + 15) & 0xFFFFFFF0);
419420 tmp = imgbuf;
@@ -456,7 +457,7 @@
456457 jpeg_destroy_decompress(&cinfo);
457458 sceKernelDeleteVpl(vpl);
458459 fclose(infile);
459- return -6;
460+ return -7;
460461 }
461462 jpeg_finish_decompress(&cinfo);
462463 jpeg_destroy_decompress(&cinfo);
@@ -485,11 +486,6 @@
485486 unsigned char header[8];
486487 SceUID vpl;
487488
488- vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
489- if (vpl < 0)
490- {
491- return -1;
492- }
493489 infile = fopen(fname, "rb");
494490 if (!infile)
495491 {
@@ -540,6 +536,11 @@
540536 png_read_update_info(png_ptr, info_ptr);
541537 // Gu転送のため1行を16バイト境界にそろえる
542538 width2 = (width + 15) & 0xFFFFFFF0;
539+ vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
540+ if (vpl < 0)
541+ {
542+ return -2;
543+ }
543544 if (sceKernelAllocateVpl(vpl, height * sizeof(png_bytep), &mem, NULL) < 0)
544545 {
545546 sceKernelDeleteVpl(vpl);
@@ -581,11 +582,6 @@
581582 void* mem;
582583 SceUID vpl;
583584
584- vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
585- if (vpl < 0)
586- {
587- return -1;
588- }
589585 infile = fopen(fname, "rb" );
590586 if (!infile)
591587 {
@@ -625,6 +621,11 @@
625621 width = (bi.biWidth + 15) & 0xFFFFFFF0;
626622 len = bi.biWidth * bi.biBitCount / 8;
627623 len += (4 - (len & 3)) & 3;
624+ vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
625+ if (vpl < 0)
626+ {
627+ return -2;
628+ }
628629 if (sceKernelAllocateVpl(vpl, sizeof(unsigned char*) * height, &mem, NULL) < 0)
629630 {
630631 sceKernelDeleteVpl(vpl);
@@ -730,11 +731,6 @@
730731 void* mem;
731732 SceUID vpl;
732733
733- vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
734- if (vpl < 0)
735- {
736- return -1;
737- }
738734 if ((GifFile = DGifOpenFileName(fname)) == NULL)
739735 {
740736 return -1;
@@ -742,6 +738,11 @@
742738 Size = GifFile->SWidth * sizeof(GifPixelType);/* Size in bytes one row.*/
743739 // Gu転送のため1行を16バイト境界にそろえる
744740 width2 = (GifFile->SWidth + 15) & 0xFFFFFFF0;
741+ vpl = sceKernelCreateVpl("ImageVpl", PSP_MEMORY_PARTITION_USER, 0, MEM_SIZE + 256, NULL);
742+ if (vpl < 0)
743+ {
744+ return -2;
745+ }
745746 if (sceKernelAllocateVpl(vpl, GifFile->SHeight * sizeof(GifRowType *), &mem, NULL) < 0)
746747 {
747748 sceKernelDeleteVpl(vpl);
--- trunc/src/psphtmlviewer.c (revision 149)
+++ trunc/src/psphtmlviewer.c (revision 150)
@@ -5,7 +5,7 @@
55
66 extern S_2CH s2ch;
77
8-#define MEM_SIZE 8*1024*1024
8+#define MEM_SIZE 14*1024*1024
99 void pspShowBrowser(char *url, char *dldir)
1010 {
1111 int done=0;
Show on old repository browser