diff --git a/src/window_manager.cc b/src/window_manager.cc index f3d01ce..f014295 100644 --- a/src/window_manager.cc +++ b/src/window_manager.cc @@ -1257,19 +1257,18 @@ Button* buttonGetButton(int btn, Window** windowPtr) } // 0x4D7A34 -int _GNW_check_menu_bars(int a1) +int _GNW_check_menu_bars(int input) { if (!gWindowSystemInitialized) { return -1; } - int v1 = a1; for (int index = gWindowsLength - 1; index >= 1; index--) { Window* window = gWindows[index]; if (window->menuBar != NULL) { for (int pulldownIndex = 0; pulldownIndex < window->menuBar->pulldownsLength; pulldownIndex++) { - if (v1 == window->menuBar->pulldowns[pulldownIndex].keyCode) { - v1 = _GNW_process_menu(window->menuBar, pulldownIndex); + if (input == window->menuBar->pulldowns[pulldownIndex].keyCode) { + input = _GNW_process_menu(window->menuBar, pulldownIndex); break; } } @@ -1280,7 +1279,7 @@ int _GNW_check_menu_bars(int a1) } } - return v1; + return input; } // 0x4D69DC diff --git a/src/window_manager.h b/src/window_manager.h index 99180d7..2f76563 100644 --- a/src/window_manager.h +++ b/src/window_manager.h @@ -177,7 +177,7 @@ int windowGetWidth(int win); int windowGetHeight(int win); int windowGetRect(int win, Rect* rect); int _win_check_all_buttons(); -int _GNW_check_menu_bars(int a1); +int _GNW_check_menu_bars(int input); void programWindowSetTitle(const char* title); bool showMesageBox(const char* str); int buttonCreate(int win, int x, int y, int width, int height, int mouseEnterEventCode, int mouseExitEventCode, int mouseDownEventCode, int mouseUpEventCode, unsigned char* up, unsigned char* dn, unsigned char* hover, int flags);