*POSSIBLY DESTABLIZING CHANGE, PLS PING ME IF YOU SEE ISSUES*

Turned on the threaded card fetching code for win/linux.  PSP runs unthreaded.   There's an easy toggle for switching which mode the app runs in: check out WResourceManager's constructor.

To fully appreciate the difference, try going into the deck editor without these changes, and use the arrow keys to navigate around (esp. up/down, as it loads 7 cards at a time).  Then try again with these mods, you'll see the cards flicker briefly to the back card image and then load as they scroll onto the screen.
This commit is contained in:
wrenczes@gmail.com
2011-04-19 07:12:05 +00:00
parent 68060e5b6c
commit 7a10993114
8 changed files with 304 additions and 183 deletions

View File

@@ -7,6 +7,10 @@
#include "WFont.h"
#include <sys/stat.h>
#ifdef PSPENV
#include "pspsdk.h"
#endif
namespace wagic
{
#ifdef TRACK_FILE_USAGE_STATS
@@ -162,6 +166,10 @@ u32 ramAvailableLineareMax(void)
size = 0;
sizeblock = RAM_BLOCK;
#ifdef PSPENV
int disableInterrupts = pspSdkDisableInterrupts();
#endif
// Check loop
while (sizeblock)
{
@@ -184,6 +192,10 @@ u32 ramAvailableLineareMax(void)
free(ram);
}
#ifdef PSPENV
pspSdkEnableInterrupts(disableInterrupts);
#endif
return size;
}
@@ -197,6 +209,10 @@ u32 ramAvailable(void)
size = 0;
count = 0;
#ifdef PSPENV
int disableInterrupts = pspSdkDisableInterrupts();
#endif
// Check loop
for (;;)
{
@@ -233,6 +249,9 @@ u32 ramAvailable(void)
free(ram);
}
#ifdef PSPENV
pspSdkEnableInterrupts(disableInterrupts);
#endif
return size;
}