mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
Remove instant quit on Ctrl+Alt+Q, allow Alt+Enter for fullscreen switch on OSX
This commit is contained in:
parent
548da72632
commit
4534b68fc5
2 changed files with 2 additions and 24 deletions
|
@ -258,15 +258,8 @@ void DSQ::toggleFullscreen()
|
||||||
// for handling the input, not the actual switch functionality
|
// for handling the input, not the actual switch functionality
|
||||||
void DSQ::onSwitchScreenMode()
|
void DSQ::onSwitchScreenMode()
|
||||||
{
|
{
|
||||||
|
if (getAltState())
|
||||||
{
|
|
||||||
|
|
||||||
#if defined(BBGE_BUILD_WINDOWS) || defined(BBGE_BUILD_UNIX)
|
|
||||||
if (getAltState()) {
|
|
||||||
toggleFullscreen();
|
toggleFullscreen();
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSQ::forceInputGrabOff()
|
void DSQ::forceInputGrabOff()
|
||||||
|
@ -3844,19 +3837,13 @@ void DSQ::bindInput()
|
||||||
|
|
||||||
user.control.actionSet.importAction(this, "Escape", ACTION_ESC);
|
user.control.actionSet.importAction(this, "Escape", ACTION_ESC);
|
||||||
|
|
||||||
#if defined(BBGE_BUILD_MACOSX)
|
|
||||||
addAction(MakeFunctionEvent(DSQ, instantQuit), KEY_Q, 1);
|
|
||||||
#endif
|
|
||||||
#if defined(BBGE_BUILD_WINDOWS) || defined(BBGE_BUILD_UNIX)
|
|
||||||
addAction(MakeFunctionEvent(DSQ, onSwitchScreenMode), KEY_RETURN, 1);
|
addAction(MakeFunctionEvent(DSQ, onSwitchScreenMode), KEY_RETURN, 1);
|
||||||
|
|
||||||
#endif
|
|
||||||
if (isDeveloperKeys())
|
if (isDeveloperKeys())
|
||||||
{
|
{
|
||||||
#ifdef AQUARIA_BUILD_CONSOLE
|
#ifdef AQUARIA_BUILD_CONSOLE
|
||||||
addAction(MakeFunctionEvent(DSQ, toggleConsole), KEY_TILDE, 0);
|
addAction(MakeFunctionEvent(DSQ, toggleConsole), KEY_TILDE, 0);
|
||||||
#endif
|
#endif
|
||||||
addAction(MakeFunctionEvent(DSQ, instantQuit), KEY_Q, 1);
|
|
||||||
addAction(MakeFunctionEvent(DSQ, toggleRenderCollisionShapes), KEY_RETURN, 0);
|
addAction(MakeFunctionEvent(DSQ, toggleRenderCollisionShapes), KEY_RETURN, 0);
|
||||||
}
|
}
|
||||||
addAction(MakeFunctionEvent(DSQ, debugMenu), KEY_BACKSPACE, 0);
|
addAction(MakeFunctionEvent(DSQ, debugMenu), KEY_BACKSPACE, 0);
|
||||||
|
|
|
@ -2757,13 +2757,6 @@ void Core::shutdown()
|
||||||
|
|
||||||
//util funcs
|
//util funcs
|
||||||
|
|
||||||
void Core::instantQuit()
|
|
||||||
{
|
|
||||||
SDL_Event event;
|
|
||||||
event.type = SDL_QUIT;
|
|
||||||
SDL_PushEvent(&event);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Core::exists(const std::string &filename)
|
bool Core::exists(const std::string &filename)
|
||||||
{
|
{
|
||||||
return ::exists(filename, false); // defined in Base.cpp
|
return ::exists(filename, false); // defined in Base.cpp
|
||||||
|
@ -2771,8 +2764,6 @@ bool Core::exists(const std::string &filename)
|
||||||
|
|
||||||
CountedPtr<Texture> Core::findTexture(const std::string &name)
|
CountedPtr<Texture> Core::findTexture(const std::string &name)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
int sz = resources.size();
|
int sz = resources.size();
|
||||||
for (int i = 0; i < sz; i++)
|
for (int i = 0; i < sz; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue