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:
mariofutire@gmail.com 2020-10-11 09:59:34 +01:00 committed by Andrea Odetti
parent e279fc7a5d
commit 3e355288cb

View file

@ -174,7 +174,7 @@ namespace
if (should_be_zero) if (should_be_zero)
{ {
throw std::string(SDL_GetError()); throw std::runtime_error(SDL_GetError());
} }
return current.refresh_rate; return current.refresh_rate;
@ -317,6 +317,11 @@ void run_sdl(int argc, const char * argv [])
} }
break; 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; std::cerr << e.key.keysym.scancode << "," << e.key.keysym.sym << "," << e.key.keysym.mod << "," << bool(e.key.repeat) << ",AAA" << std::endl;