I want to write an app that can change resolution runtime, which way is
better, or will any work/not work, or is there another, better way?
/1/
/resolution 1/
SDL_Init(…);
scr1 = SDL_SetVideoMode(…);
SDL_Quit();
/resolution 2/
SDL_Init(…);
scr2 = SDL_SetVideoMode(…);
SDL_Quit();
/2/
/resolution 1/
SDL_Init(…);
scr1 = SDL_SetVideoMode(…);
/resolution 2, memory leak?/
scr2 = SDL_SetVideoMode(…);
SDL_Quit();
Thanks,
-Jim Stapletond
the second one is the official method afaik
Steven James Samuel Stapleton wrote:>I want to write an app that can change resolution runtime, which way is
better, or will any work/not work, or is there another, better way?
/1/
/resolution 1/
SDL_Init(…);
scr1 = SDL_SetVideoMode(…);
SDL_Quit();
/resolution 2/
SDL_Init(…);
scr2 = SDL_SetVideoMode(…);
SDL_Quit();
/2/
/resolution 1/
SDL_Init(…);
scr1 = SDL_SetVideoMode(…);
/resolution 2, memory leak?/
scr2 = SDL_SetVideoMode(…);
SDL_Quit();
Thanks,
-Jim Stapletond
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
— Florian Hufsky wrote:
the second one is the official method afaik
I’d also like to add: The reason this does not cause a
memory leak is because SDL is automatically managing
it’s video memory itself.
That is, it has it’s own pointer to the video memory
block which is freed when either SDL_Quit is called,
or SDL_SetVideoMode is called again.
The one thing to note is that any previous screen
pointer will become invalid, unless you somehow get
the exact same pointer back - but that’s a matter of
chance and hardware configuration.> Steven James Samuel Stapleton wrote:
I want to write an app that can change resolution
runtime, which way is
better, or will any work/not work, or is there
another, better way?
/1/
/resolution 1/
SDL_Init(…);
scr1 = SDL_SetVideoMode(…);
SDL_Quit();
/resolution 2/
SDL_Init(…);
scr2 = SDL_SetVideoMode(…);
SDL_Quit();
/2/
/resolution 1/
SDL_Init(…);
scr1 = SDL_SetVideoMode(…);
/resolution 2, memory leak?/
scr2 = SDL_SetVideoMode(…);
SDL_Quit();
Thanks,
-Jim Stapletond
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.