projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69fcf99
)
Added ugly default key for console (Ctrl-c then F1) that works even if console is...
author
Ingo Ruhnke
<grumbel@gmx.de>
Wed, 21 May 2008 20:26:28 +0000
(20:26 +0000)
committer
Ingo Ruhnke
<grumbel@gmx.de>
Wed, 21 May 2008 20:26:28 +0000
(20:26 +0000)
SVN-Revision: 5501
src/mainloop.cpp
patch
|
blob
|
history
diff --git
a/src/mainloop.cpp
b/src/mainloop.cpp
index
1f34150
..
ec11131
100644
(file)
--- a/
src/mainloop.cpp
+++ b/
src/mainloop.cpp
@@
-180,6
+180,7
@@
void
MainLoop::process_events()
{
main_controller->update();
+ Uint8* keystate = SDL_GetKeyState(NULL);
SDL_Event event;
while(SDL_PollEvent(&event))
{
@@
-209,6
+210,14
@@
MainLoop::process_events()
{
take_screenshot();
}
+ else if (event.key.keysym.sym == SDLK_F1 &&
+ (keystate[SDLK_LCTRL] || keystate[SDLK_RCTRL]) &&
+ keystate[SDLK_c])
+ {
+ Console::instance->toggle();
+ config->console_enabled = true;
+ config->save();
+ }
break;
}
}