diff --git a/src/Bitmap.c b/src/Bitmap.c index 8ea7dfd7a..998464662 100644 --- a/src/Bitmap.c +++ b/src/Bitmap.c @@ -329,6 +329,11 @@ static BitmapCol ExpandRGB(cc_uint8 bitsPerSample, int r, int g, int b) { return BitmapCol_Make(r, g, b, 0); } +#ifdef CC_BUILD_32X +cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) { + return ERR_NOT_SUPPORTED; +} +#else cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) { cc_uint8 tmp[64]; cc_uint32 dataSize, fourCC; @@ -546,6 +551,7 @@ cc_result Png_Decode(struct Bitmap* bmp, struct Stream* stream) { if ((res = stream->Skip(stream, 4))) return res; /* Skip CRC32 */ } } +#endif /*########################################################################################################################* diff --git a/src/Platform_32x.c b/src/Platform_32x.c index cc77d04ce..c9e9c6cbd 100644 --- a/src/Platform_32x.c +++ b/src/Platform_32x.c @@ -101,7 +101,7 @@ cc_uint64 Stopwatch_Measure(void) { cc_uint64 Stopwatch_ElapsedMicroseconds(cc_uint64 beg, cc_uint64 end) { if (end < beg) return 0; - return 1; + return 1000 * 1000; } extern void _bss_end; diff --git a/src/Window_32x.c b/src/Window_32x.c index b7fe25dfd..fab424d35 100644 --- a/src/Window_32x.c +++ b/src/Window_32x.c @@ -50,7 +50,13 @@ void Window_Init(void) { void Window_Free(void) { } -void Window_Create3D(int width, int height) { +void Window_Create2D(int width, int height) { + Hw32xScreenClear(); + launcherMode = true; +} + +void Window_Create3D(int width, int height) { + Hw32xScreenClear(); launcherMode = false; } @@ -118,10 +124,6 @@ void Gamepads_Process(float delta) { /*########################################################################################################################* *------------------------------------------------------Framebuffer--------------------------------------------------------* *#########################################################################################################################*/ -void Window_Create2D(int width, int height) { - launcherMode = true; -} - void Window_AllocFramebuffer(struct Bitmap* bmp, int width, int height) { volatile uint16_t* vram = &MARS_FRAMEBUFFER + 0x100; bmp->scan0 = vram;