From c9a8b28d18e8e0d57ff8297bf015eadabe5098c0 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 12 Dec 2018 16:24:21 -0600 Subject: [PATCH] GTK+: Hook up Settings.DisplayPressedKeys --- gtk/src/gtk_config.cpp | 3 +++ gtk/src/gtk_preferences.cpp | 2 ++ gtk/src/snes9x.ui | 19 +++++++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gtk/src/gtk_config.cpp b/gtk/src/gtk_config.cpp index be5230e5..0b803fd3 100644 --- a/gtk/src/gtk_config.cpp +++ b/gtk/src/gtk_config.cpp @@ -180,6 +180,7 @@ int Snes9xConfig::load_defaults () Settings.NetPlay = FALSE; NetPlay.Paused = FALSE; NetPlay.MaxFrameSkip = 10; + Settings.DisplayPressedKeys = FALSE; #ifdef ALLOW_CPU_OVERCLOCK Settings.MaxSpriteTilesPerLine = 34; Settings.OneClockCycle = 6; @@ -334,6 +335,7 @@ int Snes9xConfig::save_config_file () #define z "Emulation::" outbool (cf, z"EmulateTransparency", Settings.Transparency); outbool (cf, z"DisplayFrameRate", Settings.DisplayFrameRate); + outbool (cf, z"DisplayPressedKeys", Settings.DisplayPressedKeys); cf.SetInt (z"SpeedControlMethod", Settings.SkipFrames, "0: Time the frames to 50 or 60Hz, 1: Same, but skip frames if too slow, 2: Synchronize to the sound buffer, 3: Unlimited, except potentially by vsync"); cf.SetInt (z"SaveSRAMEveryNSeconds", Settings.AutoSaveDelay); outbool (cf, z"BlockInvalidVRAMAccess", Settings.BlockInvalidVRAMAccessMaster); @@ -560,6 +562,7 @@ int Snes9xConfig::load_config_file () #define z "Emulation::" inbool (z"EmulateTransparency", Settings.Transparency); inbool (z"DisplayFrameRate", Settings.DisplayFrameRate); + inbool (z"DisplayPressedKeys", Settings.DisplayPressedKeys); inint (z"SpeedControlMethod", Settings.SkipFrames); inint (z"SaveSRAMEveryNSeconds", Settings.AutoSaveDelay); inbool (z"BlockInvalidVRAMAccess", Settings.BlockInvalidVRAMAccessMaster); diff --git a/gtk/src/gtk_preferences.cpp b/gtk/src/gtk_preferences.cpp index 0aa0e0c3..9df837b5 100644 --- a/gtk/src/gtk_preferences.cpp +++ b/gtk/src/gtk_preferences.cpp @@ -596,6 +596,7 @@ Snes9xPreferences::move_settings_to_dialog () { set_check ("full_screen_on_open", config->full_screen_on_open); set_check ("show_frame_rate", Settings.DisplayFrameRate); + set_check ("show_pressed_keys", Settings.DisplayPressedKeys); set_check ("change_display_resolution", config->change_display_resolution); set_check ("scale_to_fit", config->scale_to_fit); set_check ("overscan", config->overscan); @@ -783,6 +784,7 @@ Snes9xPreferences::get_settings_from_dialog () config->full_screen_on_open = get_check ("full_screen_on_open"); Settings.DisplayFrameRate = get_check ("show_frame_rate"); + Settings.DisplayPressedKeys = get_check ("show_pressed_keys"); config->scale_to_fit = get_check ("scale_to_fit"); config->overscan = get_check ("overscan"); config->maintain_aspect_ratio = get_check ("maintain_aspect_ratio"); diff --git a/gtk/src/snes9x.ui b/gtk/src/snes9x.ui index ec2b247e..9410c7b4 100644 --- a/gtk/src/snes9x.ui +++ b/gtk/src/snes9x.ui @@ -2757,6 +2757,21 @@ 1 + + + Show pressed keys + True + True + False + True + True + + + False + False + 2 + + Use overscanned height @@ -2770,7 +2785,7 @@ False False - 2 + 3 @@ -2816,7 +2831,7 @@ False False - 3 + 4