mirror of
https://github.com/libretro/smsplus-gx.git
synced 2024-12-02 14:57:19 +00:00
Fix the Scale2x code not allocating enough memory for sms_bitmap.
This commit is contained in:
parent
cd147dabcd
commit
52fee3dd9c
@ -1042,7 +1042,7 @@ int main (int argc, char *argv[])
|
||||
SDL_JoystickEventState(SDL_ENABLE);
|
||||
|
||||
#ifdef SCALE2X_UPSCALER
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 480, 16, 0, 0, 0, 0);
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 267*2, 16, 0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
fprintf(stdout, "CRC : %08X\n", cart.crc);
|
||||
|
@ -975,7 +975,7 @@ int main (int argc, char *argv[])
|
||||
SDL_ShowCursor(0);
|
||||
|
||||
#ifdef SCALE2X_UPSCALER
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 480, 16, 0, 0, 0, 0);
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 267*2, 16, 0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
fprintf(stdout, "CRC : %08X\n", cart.crc);
|
||||
|
@ -689,7 +689,7 @@ int main (int argc, char *argv[])
|
||||
ioctl(fbfd, FBIOPAN_DISPLAY, &vinfo);
|
||||
|
||||
#ifdef SCALE2X_UPSCALER
|
||||
scale2x_buf = malloc(((VIDEO_WIDTH_SMS*2)*480)*sizeof(uint16_t));
|
||||
scale2x_buf = malloc(((VIDEO_WIDTH_SMS*2)*(267*2))*sizeof(uint16_t));
|
||||
#endif
|
||||
|
||||
fprintf(stdout, "CRC : %08X\n", cart.crc);
|
||||
|
@ -626,7 +626,7 @@ int main (int argc, char *argv[])
|
||||
SDL_ShowCursor(0);
|
||||
|
||||
#ifdef SCALE2X_UPSCALER
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 480, 16, 0, 0, 0, 0);
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 267*2, 16, 0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
fprintf(stdout, "CRC : %08X\n", cart.crc);
|
||||
|
@ -783,7 +783,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
sms_bitmap = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS, 267, 16, 0, 0, 0, 0);
|
||||
#ifdef SCALE2X_UPSCALER
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 480, 16, 0, 0, 0, 0);
|
||||
scale2x_buf = SDL_CreateRGBSurface(SDL_SWSURFACE, VIDEO_WIDTH_SMS*2, 267*2, 16, 0, 0, 0, 0);
|
||||
#endif
|
||||
img_background = SDL_LoadBMP("background.bmp");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user