From 78d0466befb94fc85769ad01657d85c5bb19b0ac Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 19 Jul 2020 19:21:03 -0300 Subject: [PATCH] Add documentation link in the Help menu --- src/include/86box/resource.h | 1 + src/include/86box/version.h | 3 ++- src/win/86Box.rc | 1 + src/win/win_ui.c | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/86box/resource.h b/src/include/86box/resource.h index 450006ae4..b2c4810f6 100644 --- a/src/include/86box/resource.h +++ b/src/include/86box/resource.h @@ -315,6 +315,7 @@ #define IDM_VID_GRAY_WHITE 40084 #define IDM_MEDIA 40085 +#define IDM_DOCS 40086 #ifdef USE_DISCORD #define IDM_DISCORD 40090 diff --git a/src/include/86box/version.h b/src/include/86box/version.h index 7691bdab4..46deb8fe3 100644 --- a/src/include/86box/version.h +++ b/src/include/86box/version.h @@ -26,4 +26,5 @@ /* Web URL info. */ #define EMU_SITE L"86box.net" -#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest" \ No newline at end of file +#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest" +#define EMU_DOCS_URL L"https://86box.readthedocs.io" diff --git a/src/win/86Box.rc b/src/win/86Box.rc index 25748fbdf..32da3d016 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -162,6 +162,7 @@ BEGIN #endif POPUP "&Help" BEGIN + MENUITEM "&Documentation...", IDM_DOCS MENUITEM "&About 86Box...", IDM_ABOUT END END diff --git a/src/win/win_ui.c b/src/win/win_ui.c index ff405e128..304aa246f 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -39,6 +39,7 @@ #include <86box/plat_midi.h> #include <86box/ui.h> #include <86box/win.h> +#include <86box/version.h> #ifdef USE_DISCORD # include <86box/win_discord.h> #endif @@ -363,6 +364,10 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) AboutDialogCreate(hwnd); break; + case IDM_DOCS: + ShellExecute(hwnd, L"open", EMU_DOCS_URL, NULL, NULL, SW_SHOW); + break; + case IDM_UPDATE_ICONS: update_icons ^= 1; CheckMenuItem(hmenu, IDM_UPDATE_ICONS, update_icons ? MF_CHECKED : MF_UNCHECKED);