From 78cb283eaf5bffe67df86308523c4ec866a9e662 Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 4 Aug 2008 19:31:22 +0000 Subject: [PATCH] Moved stuff around and added input display and lag counter display in a menu. Lag counter display currently backwards, input display not hooked up. --- src/drivers/win/main.cpp | 1 + src/drivers/win/res.rc | 7 ++++++- src/drivers/win/resource.h | 9 ++++++++- src/drivers/win/window.cpp | 7 ++++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 61c6913d..d7814955 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -39,6 +39,7 @@ #include "../../state.h" #include "../../debug.h" #include "../../movie.h" + #include "archive.h" #include "input.h" #include "netplay.h" diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index b68c6827..f8296108 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -77,11 +77,16 @@ BEGIN POPUP "&Config" BEGIN MENUITEM "Hide Menu", MENU_HIDE_MENU - MENUITEM "Show Movie Status Icon", MENU_SHOW_STATUS_ICON MENUITEM "Pause After Playback", MENU_PAUSEAFTERPLAYBACK MENUITEM "Enable Run in Background", MENU_RUN_IN_BACKGROUND MENUITEM "Enable Background Input", MENU_BACKGROUND_INPUT MENUITEM "Enable Auto-save", MENU_ENABLE_AUTOSAVE + POPUP "Display" + BEGIN + MENUITEM "Movie Status Icon", MENU_SHOW_STATUS_ICON + MENUITEM "Input Display", MENU_DISPLAY_INPUTDISPLAY + MENUITEM "Lag Counter", MENU_DISPLAY_LAGCOUNTER + END MENUITEM SEPARATOR MENUITEM "Game Genie", MENU_GAME_GENIE MENUITEM "PAL Emulation", MENU_PAL diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index 3cd2b76b..c47e11ce 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -508,6 +508,13 @@ #define MENU_BASIC_BOT2 40220 #define ID_FILE_RUNLUASCRIPT 40229 #define ID_FILE_STOPLUASCRIPT 40230 +#define ID_CONFIG_DISPLAY 40231 +#define ID_DISPLAY_INPUTDISPLAY 40232 +#define ID_DISPLAY_LAGCOUNTER 40233 +#define FCUE_DISPLAY_INPUTDISPLAY 40234 +#define FCEU_DISPLAY_LAGCOUNTER 40235 +#define MENU_DISPLAY_INPUTDISPLAY 40236 +#define MENU_DISPLAY_LAGCOUNTER 40237 #define MW_ValueLabel2 65423 #define MW_ValueLabel1 65426 @@ -516,7 +523,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 124 -#define _APS_NEXT_COMMAND_VALUE 40231 +#define _APS_NEXT_COMMAND_VALUE 40238 #define _APS_NEXT_CONTROL_VALUE 1179 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index b73c2e7e..1ded5675 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -21,6 +21,7 @@ // File description: Everything relevant for the main window should go here. This // does not include functions relevant for dialog windows. +#include "../../input.h" #include "window.h" #include "main.h" #include "state.h" @@ -298,7 +299,7 @@ void UpdateCheckedMenuItems() { CheckMenuItem(fceumenu, polo2[x], *polo[x] ? MF_CHECKED : MF_UNCHECKED); } - + CheckMenuItem(fceumenu, MENU_DISPLAY_LAGCOUNTER, lagCounter?MF_CHECKED : MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_DISPLAY_BG, bg?MF_CHECKED:MF_UNCHECKED); CheckMenuItem(fceumenu, MENU_DISPLAY_OBJ, spr?MF_CHECKED:MF_UNCHECKED); @@ -1174,6 +1175,10 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) case ID_FILE_STOPLUASCRIPT: FCEU_LuaStop(); break; + case MENU_DISPLAY_LAGCOUNTER: + lagCounterDisplay ^= 1; + UpdateCheckedMenuItems(); + } } break;