win: Replace the main menubar Media menu handler

This commit is contained in:
David Hrdlička
2020-04-26 17:00:45 +02:00
parent 3d723d9135
commit 03f82fdb99
3 changed files with 5 additions and 1 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);