add alt-f4
This commit is contained in:
@@ -451,6 +451,20 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
DeviceInput DeviceI = (DeviceInput)ieArray[i];
|
DeviceInput DeviceI = (DeviceInput)ieArray[i];
|
||||||
InputEventType type = ieArray[i].type;
|
InputEventType type = ieArray[i].type;
|
||||||
|
|
||||||
|
/* ALT-F4 -> quit (better place for this? in ScreenManager perhaps?) */
|
||||||
|
if(type == IET_FIRST_PRESS &&
|
||||||
|
DeviceI == DeviceInput(DEVICE_KEYBOARD, DIK_F4) &&
|
||||||
|
(INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_RMENU)) ||
|
||||||
|
INPUTMAN->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, DIK_LMENU)) ) )
|
||||||
|
{
|
||||||
|
SDL_Event *event;
|
||||||
|
event = (SDL_Event *) malloc(sizeof(event));
|
||||||
|
event->type = SDL_QUIT;
|
||||||
|
SDL_PushEvent(event);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
GameInput GameI;
|
GameInput GameI;
|
||||||
MenuInput MenuI;
|
MenuInput MenuI;
|
||||||
StyleInput StyleI;
|
StyleInput StyleI;
|
||||||
|
|||||||
Reference in New Issue
Block a user