add option to choose whether left alt or both alts toggle's fullscreen
This commit is contained in:
parent
05668f792a
commit
a740f7754c
|
@ -46,6 +46,7 @@ Config::Config()
|
||||||
frameSkip(true),
|
frameSkip(true),
|
||||||
solidFonts(false),
|
solidFonts(false),
|
||||||
gameFolder("."),
|
gameFolder("."),
|
||||||
|
anyAltToggleFS(false),
|
||||||
allowSymlinks(false)
|
allowSymlinks(false)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
@ -64,6 +65,7 @@ void Config::read()
|
||||||
PO_DESC(frameSkip, bool) \
|
PO_DESC(frameSkip, bool) \
|
||||||
PO_DESC(solidFonts, bool) \
|
PO_DESC(solidFonts, bool) \
|
||||||
PO_DESC(gameFolder, std::string) \
|
PO_DESC(gameFolder, std::string) \
|
||||||
|
PO_DESC(anyAltToggleFS, bool) \
|
||||||
PO_DESC(allowSymlinks, bool) \
|
PO_DESC(allowSymlinks, bool) \
|
||||||
PO_DESC(customScript, std::string)
|
PO_DESC(customScript, std::string)
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct Config
|
||||||
bool solidFonts;
|
bool solidFonts;
|
||||||
|
|
||||||
std::string gameFolder;
|
std::string gameFolder;
|
||||||
|
bool anyAltToggleFS;
|
||||||
bool allowSymlinks;
|
bool allowSymlinks;
|
||||||
|
|
||||||
std::string customScript;
|
std::string customScript;
|
||||||
|
|
|
@ -70,6 +70,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
||||||
WindowSizeNotify &windowSizeMsg = rtData.windowSizeMsg;
|
WindowSizeNotify &windowSizeMsg = rtData.windowSizeMsg;
|
||||||
|
|
||||||
fullscreen = rtData.config.fullscreen;
|
fullscreen = rtData.config.fullscreen;
|
||||||
|
int toggleFSMod = rtData.config.anyAltToggleFS ? KMOD_ALT : KMOD_LALT;
|
||||||
|
|
||||||
fps.lastFrame = SDL_GetPerformanceCounter();
|
fps.lastFrame = SDL_GetPerformanceCounter();
|
||||||
fps.displaying = false;
|
fps.displaying = false;
|
||||||
|
@ -145,7 +146,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
||||||
|
|
||||||
case SDL_KEYDOWN :
|
case SDL_KEYDOWN :
|
||||||
if (event.key.keysym.scancode == SDL_SCANCODE_RETURN &&
|
if (event.key.keysym.scancode == SDL_SCANCODE_RETURN &&
|
||||||
(event.key.keysym.mod & KMOD_ALT))
|
(event.key.keysym.mod & toggleFSMod))
|
||||||
{
|
{
|
||||||
setFullscreen(win, !fullscreen);
|
setFullscreen(win, !fullscreen);
|
||||||
if (!fullscreen && havePendingTitle)
|
if (!fullscreen && havePendingTitle)
|
||||||
|
|
Loading…
Reference in New Issue