Last active
August 19, 2026 06:53
-
-
Save umjammer/89a28d146080920deb471da0c818f762 to your computer and use it in GitHub Desktop.
[np2kai] screen x2 patch for sdl2 version git:da21965
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/sdl/scrnmng.c b/sdl/scrnmng.c | |
| index 1d59b5b..ac8ff22 100755 | |
| --- a/sdl/scrnmng.c | |
| +++ b/sdl/scrnmng.c | |
| @@ -75,6 +75,8 @@ static BRESULT calcdrawrect(DRAWRECT *dr, const RECT_T *rt) { | |
| return(SUCCESS); | |
| } | |
| +int screen_scale = 2; | |
| + | |
| void scrnmng_initialize(void) { | |
| scrnmng.width = 640; | |
| scrnmng.height = 400; | |
| @@ -111,9 +113,9 @@ BRESULT scrnmng_create(UINT8 mode) { | |
| scrnmng.pc98surf = SDL_CreateRGBSurface(SDL_SWSURFACE, scrnmng.width, scrnmng.height, scrnmng.bpp, 0xf800, 0x07e0, 0x001f, 0); | |
| #else | |
| if(mode & SCRNMODE_ROTATEMASK) { | |
| - s_window = SDL_CreateWindow(app_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, scrnmng.height, scrnmng.width, 0); | |
| + s_window = SDL_CreateWindow(app_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, scrnmng.height * screen_scale, scrnmng.width * screen_scale, 0); | |
| } else { | |
| - s_window = SDL_CreateWindow(app_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, scrnmng.width, scrnmng.height, 0); | |
| + s_window = SDL_CreateWindow(app_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, scrnmng.width * screen_scale, scrnmng.height * screen_scale, 0); | |
| } | |
| s_renderer = SDL_CreateRenderer(s_window, -1, 0); | |
| #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment