wxwidgets: exit-fullscreen to forcibly exit fullscreen mode

This commit is contained in:
Ilari Liusvaara 2015-02-14 01:45:43 +02:00
parent ea78fecb1b
commit 94170ec2d5

View file

@ -1886,3 +1886,16 @@ void wxwin_mainwindow::enter_or_leave_fullscreen(bool fs)
request_paint(); //Don't leave graphical corruption.
}
}
namespace
{
struct command::stub _exit_fullscreen = {"exit-fullscreen", "Exit fullscreen",
"Syntax: exit_fullscreen\nExit fullscreen"};
command::fnptr<> exit_fullscreen(lsnes_cmds, _exit_fullscreen,
[]() throw(std::bad_alloc, std::runtime_error) {
runuifun([]() {
if(is_fs)
main_window->enter_or_leave_fullscreen(false);
});
});
}