Merge branch 'master' of https://github.com/86Box/86Box into qt

This commit is contained in:
ts-korhonen
2022-01-09 16:52:30 +02:00
5 changed files with 22 additions and 4 deletions

View File

@@ -450,9 +450,6 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow)
{
char **argv = NULL;
int argc, i;
wchar_t * AppID = L"86Box.86Box\0";
SetCurrentProcessExplicitAppUserModelID(AppID);
/* Initialize the COM library for the main thread. */
CoInitializeEx(NULL, COINIT_MULTITHREADED);

View File

@@ -65,6 +65,7 @@ int user_resize = 0;
int fixed_size_x = 0, fixed_size_y = 0;
int kbd_req_capture = 0;
int hide_status_bar = 0;
int hide_tool_bar = 0;
int dpi = 96;
extern char openfilestring[512];
@@ -92,6 +93,13 @@ static dllimp_t user32_imports[] = {
{ NULL, NULL }
};
/* Taskbar application ID API, Windows 7+ */
void* shell32_handle = NULL;
static HRESULT (WINAPI *pSetCurrentProcessExplicitAppUserModelID)(PCWSTR AppID);
static dllimp_t shell32_imports[]= {
{ "SetCurrentProcessExplicitAppUserModelID", &pSetCurrentProcessExplicitAppUserModelID }
};
int
win_get_dpi(HWND hwnd) {
if (user32_handle != NULL) {
@@ -1244,6 +1252,11 @@ ui_init(int nCmdShow)
/* Load DPI related Windows 10 APIs */
user32_handle = dynld_module("user32.dll", user32_imports);
/* Set the application ID for the taskbar. */
shell32_handle = dynld_module("shell32.dll", shell32_imports);
if (shell32_handle)
pSetCurrentProcessExplicitAppUserModelID(L"86Box.86Box");
/* Set up TaskDialog configuration. */
tdconfig.cbSize = sizeof(tdconfig);
tdconfig.dwFlags = TDF_ENABLE_HYPERLINKS;