mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 10:11:00 +00:00
SDL: Support fullscreen in SDL 1.2
This commit is contained in:
parent
11f3a6e43d
commit
147852898c
1
CHANGES
1
CHANGES
@ -11,6 +11,7 @@ Misc:
|
||||
- GBA Memory: Use a dynamically sized mask for ROM memory
|
||||
- Qt: Remove useless help icons in dialogs
|
||||
- ARM7: Combine shifter-immediate and shifter-register functions to reduce binary size
|
||||
- SDL: Support fullscreen in SDL 1.2
|
||||
|
||||
0.3.0: (2015-08-16)
|
||||
Features:
|
||||
|
@ -39,9 +39,9 @@ void GBASDLGLCommonInit(struct SDLSoftwareRenderer* renderer) {
|
||||
#else
|
||||
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
|
||||
#ifdef COLOR_16_BIT
|
||||
SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 16, SDL_OPENGL);
|
||||
SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 16, SDL_OPENGL | (SDL_FULLSCREEN * renderer->fullscreen));
|
||||
#else
|
||||
SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 32, SDL_OPENGL);
|
||||
SDL_SetVideoMode(renderer->viewportWidth, renderer->viewportHeight, 32, SDL_OPENGL | (SDL_FULLSCREEN * renderer->fullscreen));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ int main(int argc, char** argv) {
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
renderer.player.fullscreen = opts.fullscreen;
|
||||
renderer.player.windowUpdated = 0;
|
||||
#else
|
||||
renderer.fullscreen = opts.fullscreen;
|
||||
#endif
|
||||
renderer.ratio = graphicsOpts.multiplier;
|
||||
if (renderer.ratio == 0) {
|
||||
|
@ -49,6 +49,8 @@ struct SDLSoftwareRenderer {
|
||||
SDL_Texture* sdlTex;
|
||||
SDL_Renderer* sdlRenderer;
|
||||
SDL_GLContext* glCtx;
|
||||
#else
|
||||
bool fullscreen;
|
||||
#endif
|
||||
|
||||
int viewportWidth;
|
||||
|
Loading…
Reference in New Issue
Block a user