Add website to about dialog

This commit is contained in:
RichardG867
2020-06-19 00:34:56 -03:00
parent 666f02dc23
commit 9f5956d456
2 changed files with 12 additions and 3 deletions

View File

@@ -43,7 +43,8 @@
#define COPYRIGHT_YEAR "2020"
/* Web URL info. */
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
#define EMU_SITE L"86box.github.io"
#define EMU_ROMS_URL L"https://github.com/86Box/roms/releases/latest"
/* Filename and pathname info. */
#define CONFIG_FILE L"86box.cfg"

View File

@@ -35,8 +35,12 @@
void
AboutDialogCreate(HWND hwnd)
{
int i;
TASKDIALOGCONFIG tdconfig = {0};
TASKDIALOG_BUTTON tdbuttons[] = {{IDCANCEL, MAKEINTRESOURCE(IDS_2127)}};
TASKDIALOG_BUTTON tdbuttons[] = {
{IDOK, EMU_SITE},
{IDCANCEL, MAKEINTRESOURCE(IDS_2127)}
};
tdconfig.cbSize = sizeof(tdconfig);
tdconfig.hwndParent = hwnd;
@@ -48,5 +52,9 @@ AboutDialogCreate(HWND hwnd)
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2126);
tdconfig.cButtons = ARRAYSIZE(tdbuttons);
tdconfig.pButtons = tdbuttons;
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
tdconfig.nDefaultButton = IDCANCEL;
TaskDialogIndirect(&tdconfig, &i, NULL, NULL);
if (i == IDOK)
ShellExecute(hwnd, L"open", L"https://" EMU_SITE, NULL, NULL, SW_SHOW);
}