]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Added "Open Game Folder" item to boxart window system menu.
authorToni Wilen <twilen@winuae.net>
Sat, 30 Jun 2018 10:14:08 +0000 (13:14 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 30 Jun 2018 10:14:08 +0000 (13:14 +0300)
od-win32/win32gui_extra.cpp

index 3e322c24b37e6a26f62055f328b8f4bf91759487..230ff2845857a23d74f57c797ba5598c5b87763e 100644 (file)
@@ -805,6 +805,10 @@ static bool open_box_art_window(void)
                        GetClientRect(boxarthwnd, &r);
                        boxart_window_width = r.right - r.left;
                        boxart_window_height = r.bottom - r.top;
+
+                       HMENU menu = GetSystemMenu(boxarthwnd, FALSE);
+                       InsertMenu(menu, -1, MF_BYPOSITION | MF_SEPARATOR, 0, _T(""));
+                       InsertMenu(menu, -1, MF_BYPOSITION, 1, _T("Open Game Folder"));
                }
        } else {
                move_box_art_window();
@@ -1127,6 +1131,12 @@ LRESULT CALLBACK BoxArtWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
                        r->bottom = r2.bottom;
                }
                return FALSE;
+               case WM_SYSCOMMAND:
+               if (wParam == 1) {
+                       ShellExecute(NULL, _T("explore"), image_path, NULL, NULL, SW_SHOWNORMAL);
+                       return FALSE;
+               }
+               break;
        }
        return DefWindowProc(hWnd, message, wParam, lParam);
 }