sa2: F2 = quit (line applen).
throw an exception rather than a string. Signed-off-by: mariofutire@gmail.com <pi@raspberrypi>
This commit is contained in:
parent
e279fc7a5d
commit
3e355288cb
1 changed files with 6 additions and 1 deletions
|
@ -174,7 +174,7 @@ namespace
|
|||
|
||||
if (should_be_zero)
|
||||
{
|
||||
throw std::string(SDL_GetError());
|
||||
throw std::runtime_error(SDL_GetError());
|
||||
}
|
||||
|
||||
return current.refresh_rate;
|
||||
|
@ -317,6 +317,11 @@ void run_sdl(int argc, const char * argv [])
|
|||
}
|
||||
break;
|
||||
}
|
||||
case SDL_SCANCODE_F2:
|
||||
{
|
||||
quit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
std::cerr << e.key.keysym.scancode << "," << e.key.keysym.sym << "," << e.key.keysym.mod << "," << bool(e.key.repeat) << ",AAA" << std::endl;
|
||||
|
|
Loading…
Add table
Reference in a new issue