get proper fullscreen with the unlocked unlocked settings (to review later on)
This commit is contained in:
parent
48cf89cdbc
commit
e436dac1e0
|
@ -106,6 +106,8 @@ EventThread::EventThread()
|
||||||
showCursor(false)
|
showCursor(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
SDL_DisplayMode dm = {0};
|
||||||
|
|
||||||
void EventThread::process(RGSSThreadData &rtData)
|
void EventThread::process(RGSSThreadData &rtData)
|
||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
@ -541,6 +543,9 @@ void EventThread::resetInputStates()
|
||||||
|
|
||||||
void EventThread::setFullscreen(SDL_Window *win, bool mode)
|
void EventThread::setFullscreen(SDL_Window *win, bool mode)
|
||||||
{
|
{
|
||||||
|
SDL_GetDesktopDisplayMode(0, &dm);
|
||||||
|
SDL_SetWindowSize(win, dm.w, dm.h);
|
||||||
|
SDL_WINDOWEVENT_SIZE_CHANGED;
|
||||||
SDL_SetWindowFullscreen
|
SDL_SetWindowFullscreen
|
||||||
(win, mode ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
|
(win, mode ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
|
||||||
fullscreen = mode;
|
fullscreen = mode;
|
||||||
|
|
Loading…
Reference in New Issue