From 03f82fdb99b20e2ffb2a4c53d34587c184423bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Sun, 26 Apr 2020 17:00:45 +0200 Subject: [PATCH] win: Replace the main menubar Media menu handler --- src/include/86box/win.h | 1 + src/win/win_stbar.c | 2 ++ src/win/win_ui.c | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/include/86box/win.h b/src/include/86box/win.h index abeffac80..262bb1f8a 100644 --- a/src/include/86box/win.h +++ b/src/include/86box/win.h @@ -189,6 +189,7 @@ extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title); /* Functions in win_media_menu.c */ extern void media_menu_init(); extern void media_menu_reset(); +extern int media_menu_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); extern void media_menu_update_floppy(int id); extern void media_menu_update_cdrom(int id); extern void media_menu_update_zip(int id); diff --git a/src/win/win_stbar.c b/src/win/win_stbar.c index 9b2e36d68..33039f270 100644 --- a/src/win/win_stbar.c +++ b/src/win/win_stbar.c @@ -613,6 +613,8 @@ ui_sb_update_panes(void) c_scsi = hdd_count(HDD_BUS_SCSI); do_net = network_available(); + media_menu_reset(); + if (sb_parts > 0) { for (i = 0; i < sb_parts; i++) SendMessage(hwndSBAR, SB_SETICON, i, (LPARAM)NULL); diff --git a/src/win/win_ui.c b/src/win/win_ui.c index cc4240949..5fa549e8b 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -595,7 +595,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; #endif default: - MediaMenuHandler(hwnd, message, wParam, lParam); + media_menu_proc(hwnd, message, wParam, lParam); break; } return(0); @@ -913,6 +913,7 @@ ui_init(int nCmdShow) /* Reset all menus to their defaults. */ ResetAllMenus(); + media_menu_init(); /* Make the window visible on the screen. */ ShowWindow(hwnd, nCmdShow);