Skip to content

Commit

Permalink
Show the bindings of both the Pause and Reset options in the menu…
Browse files Browse the repository at this point in the history
…bar.
  • Loading branch information
Arignir committed Mar 2, 2024
1 parent 50158a3 commit 4e3d480
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/app/windows/menubar.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ void
app_win_menubar_emulation(
struct app *app
) {
char const *bind;

if (igBeginMenu("Emulation", true)) {

if (igBeginMenu("Speed", app->emulation.is_started)) {
Expand Down Expand Up @@ -181,7 +183,8 @@ app_win_menubar_emulation(

igSeparator();

if (igMenuItem_Bool("Pause", NULL, !app->emulation.is_running, app->emulation.is_started)) {
bind = SDL_GetKeyName(app->binds.keyboard[BIND_EMULATOR_PAUSE]);
if (igMenuItem_Bool("Pause", bind ?: "", !app->emulation.is_running, app->emulation.is_started)) {
if (app->emulation.is_running) {
app_emulator_pause(app);
} else {
Expand All @@ -193,7 +196,8 @@ app_win_menubar_emulation(
app_emulator_stop(app);
}

if (igMenuItem_Bool("Reset", NULL, false, app->emulation.is_started)) {
bind = SDL_GetKeyName(app->binds.keyboard[BIND_EMULATOR_RESET]);
if (igMenuItem_Bool("Reset", bind ?: "", false, app->emulation.is_started)) {
app_emulator_reset(app);
app_emulator_run(app);
}
Expand Down

0 comments on commit 4e3d480

Please sign in to comment.