diff --git a/Makefile.common b/Makefile.common index 9984ca9f85..61907b06df 100644 --- a/Makefile.common +++ b/Makefile.common @@ -2526,6 +2526,7 @@ endif ifneq ($(findstring Win32,$(OS)),) OBJ += media/rarch.o \ + gfx/common/win32_resources.o \ gfx/common/win32_common.o \ frontend/drivers/platform_win32.o \ gfx/display_servers/dispserv_win32.o diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index b62da814ad..81d4d36e5e 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -55,6 +55,7 @@ #include "../../verbosity.h" #include "../../msg_hash_lbl_str.h" #include "../../ui/drivers/ui_win32.h" +#include "../../gfx/common/win32_resources.h" #include "platform_win32.h" @@ -647,24 +648,9 @@ static size_t frontend_win32_get_os(char *s, size_t len, int *major, int *minor) static void frontend_win32_init(void *data) { - typedef BOOL (WINAPI *isProcessDPIAwareProc)(); - typedef BOOL (WINAPI *setProcessDPIAwareProc)(); -#ifdef HAVE_DYLIB - HMODULE handle = - GetModuleHandle("User32.dll"); - isProcessDPIAwareProc isDPIAwareProc = - (isProcessDPIAwareProc)dylib_proc(handle, "IsProcessDPIAware"); - setProcessDPIAwareProc setDPIAwareProc = - (setProcessDPIAwareProc)dylib_proc(handle, "SetProcessDPIAware"); -#else - isProcessDPIAwareProc isDPIAwareProc = IsProcessDPIAware; - setProcessDPIAwareProc setDPIAwareProc = SetProcessDPIAware; -#endif - - if (isDPIAwareProc) - if (!isDPIAwareProc()) - if (setDPIAwareProc) - setDPIAwareProc(); + /* Initializes DPI awareness, accelerator table, and + * prepares programmatic resources (replaces .rc file). */ + win32_resources_init(); } diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index b18baa2092..6527fc3526 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -41,6 +41,7 @@ #endif #include "win32_common.h" +#include "win32_resources.h" #ifdef HAVE_GDI #include "gdi_defines.h" @@ -577,8 +578,8 @@ static bool win32_load_content_from_gui(const char *szFilename) video_st->poke->show_mouse(video_st->data, true); /* Pick one core that could be compatible. */ - if (DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_PICKCORE), - main_window.hwnd, pick_core_proc, (LPARAM)NULL) == IDOK) + if (win32_resources_pick_core_dialog( + main_window.hwnd, pick_core_proc) == IDOK) { task_push_load_content_with_current_core_from_companion_ui( NULL, &content_info, CORE_TYPE_PLAIN, NULL, NULL); @@ -2060,7 +2061,7 @@ bool win32_window_create(void *data, unsigned style, if (!main_window.hwnd) return false; - window_accelerators = LoadAcceleratorsA(GetModuleHandleA(NULL), MAKEINTRESOURCE(IDR_ACCELERATOR1)); + window_accelerators = win32_resources_get_accelerator(); #ifdef HAVE_TASKBAR g_win32->taskbar_message = @@ -2734,7 +2735,7 @@ void win32_set_window(unsigned *width, unsigned *height, rc_temp.right = (LONG)*height; rc_temp.bottom = 0x7FFF; - menuItem = LoadMenuA(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MENU)); + menuItem = win32_resources_create_menu(); win32_localize_menu(menuItem); SetMenu(main_window.hwnd, menuItem); diff --git a/gfx/common/win32_resources.c b/gfx/common/win32_resources.c new file mode 100644 index 0000000000..666cbb716d --- /dev/null +++ b/gfx/common/win32_resources.c @@ -0,0 +1,334 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2024 - RetroArch contributors + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +/* Programmatic replacement for the menu, dialog, accelerator, + * and manifest resources formerly in media/rarch.rc and + * media/rarch_ja.rc. + * + * The icon resource remains in rarch.rc so the executable has + * an embedded icon visible in Explorer / taskbar / Alt+Tab. + * + * This file creates: + * IDR_MENU → win32_resources_create_menu() + * IDR_ACCELERATOR1 → win32_resources_get_accelerator() + * IDD_PICKCORE → win32_resources_pick_core_dialog() + * rarch.manifest → apply_dpi_awareness() (called from _init) + */ + +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0601 +#endif + +#include +#include +#include + +#include "win32_resources.h" +#include "../../ui/drivers/ui_win32_resource.h" + +/* ---------------------------------------------------------------- + * Internal state + * ---------------------------------------------------------------- */ +static HACCEL s_accel_table = NULL; + +/* ---------------------------------------------------------------- + * DPI AWARENESS (replaces media/rarch.manifest) + * + * The manifest contained: + * true + * + * We call the equivalent API at runtime. + * ---------------------------------------------------------------- */ +typedef HRESULT (WINAPI *pfn_SetProcessDpiAwareness)(int); + +static void apply_dpi_awareness(void) +{ + HMODULE shcore = LoadLibraryW(L"shcore.dll"); + if (shcore) + { + pfn_SetProcessDpiAwareness fn = + (pfn_SetProcessDpiAwareness)(void*)GetProcAddress( + shcore, "SetProcessDpiAwareness"); + if (fn) + { + /* PROCESS_SYSTEM_DPI_AWARE = 1 */ + fn(1); + FreeLibrary(shcore); + return; + } + FreeLibrary(shcore); + } + + /* Fallback for Vista / Win7 without shcore */ + SetProcessDPIAware(); +} + +/* ---------------------------------------------------------------- + * ACCELERATOR TABLE (replaces IDR_ACCELERATOR1) + * + * Ctrl+O → ID_M_LOAD_CONTENT + * Alt+Enter → ID_M_FULL_SCREEN + * ---------------------------------------------------------------- */ +static HACCEL create_accelerator_table(void) +{ + ACCEL accel[2]; + + accel[0].fVirt = FCONTROL | FVIRTKEY | FNOINVERT; + accel[0].key = 'O'; + accel[0].cmd = ID_M_LOAD_CONTENT; + + accel[1].fVirt = FALT | FVIRTKEY | FNOINVERT; + accel[1].key = VK_RETURN; + accel[1].cmd = ID_M_FULL_SCREEN; + + return CreateAcceleratorTableW(accel, 2); +} + +/* ---------------------------------------------------------------- + * MENU BAR (replaces IDR_MENU from rarch.rc) + * + * The menu is always created with English labels; RetroArch's + * existing win32_localize_menu() in win32_common.c re-labels + * every item with the localized string for the active language, + * so there is no need for a separate Japanese menu. + * ---------------------------------------------------------------- */ +HMENU win32_resources_create_menu(void) +{ + HMENU menu_bar, file_menu, command_menu, window_menu; + HMENU audio_menu, disk_menu, savestate_menu, stateindex_menu; + HMENU scale_menu; + + menu_bar = CreateMenu(); + if (!menu_bar) + return NULL; + + /* ---- File ---- */ + file_menu = CreatePopupMenu(); + AppendMenuA(file_menu, MF_STRING, ID_M_LOAD_CORE, "Load Core..."); + AppendMenuA(file_menu, MF_STRING, ID_M_LOAD_CONTENT, "Load Content..."); + AppendMenuA(file_menu, MF_SEPARATOR, 0, NULL); + AppendMenuA(file_menu, MF_STRING, ID_M_QUIT, "Close"); + AppendMenuA(menu_bar, MF_POPUP, (UINT_PTR)file_menu, "File"); + + /* ---- Command ---- */ + command_menu = CreatePopupMenu(); + + /* Audio Options */ + audio_menu = CreatePopupMenu(); + AppendMenuA(audio_menu, MF_STRING, ID_M_MUTE_TOGGLE, "Audio Mute Toggle"); + AppendMenuA(command_menu, MF_POPUP, (UINT_PTR)audio_menu, "Audio Options"); + + /* Disk Options */ + disk_menu = CreatePopupMenu(); + AppendMenuA(disk_menu, MF_STRING, ID_M_DISK_CYCLE, "Disk Eject Toggle"); + AppendMenuA(disk_menu, MF_STRING, ID_M_DISK_PREV, "Disk Previous"); + AppendMenuA(disk_menu, MF_STRING, ID_M_DISK_NEXT, "Disk Next"); + AppendMenuA(command_menu, MF_POPUP, (UINT_PTR)disk_menu, "Disk Options"); + + /* Save State Options */ + savestate_menu = CreatePopupMenu(); + + /* State Index sub-menu */ + stateindex_menu = CreatePopupMenu(); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_AUTO, "Auto"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_0, "0"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_1, "1"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_2, "2"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_3, "3"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_4, "4"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_5, "5"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_6, "6"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_7, "7"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_8, "8"); + AppendMenuA(stateindex_menu, MF_STRING, ID_M_STATE_INDEX_9, "9"); + AppendMenuA(savestate_menu, MF_POPUP, + (UINT_PTR)stateindex_menu, "State Index"); + + AppendMenuA(savestate_menu, MF_STRING, ID_M_LOAD_STATE, "Load State"); + AppendMenuA(savestate_menu, MF_STRING, ID_M_SAVE_STATE, "Save State"); + AppendMenuA(command_menu, MF_POPUP, + (UINT_PTR)savestate_menu, "Save State Options"); + + AppendMenuA(command_menu, MF_STRING, ID_M_RESET, "Reset"); + AppendMenuA(command_menu, MF_STRING, ID_M_PAUSE_TOGGLE, "Pause Toggle"); + AppendMenuA(command_menu, MF_STRING, ID_M_MENU_TOGGLE, "Menu Toggle"); + AppendMenuA(command_menu, MF_STRING, ID_M_TAKE_SCREENSHOT, "Take Screenshot"); + AppendMenuA(command_menu, MF_STRING, ID_M_MOUSE_GRAB, "Mouse Grab Toggle"); + AppendMenuA(menu_bar, MF_POPUP, (UINT_PTR)command_menu, "Command"); + + /* ---- Window ---- */ + window_menu = CreatePopupMenu(); + + /* Windowed Scale sub-menu */ + scale_menu = CreatePopupMenu(); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_1X, "1x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_2X, "2x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_3X, "3x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_4X, "4x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_5X, "5x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_6X, "6x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_7X, "7x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_8X, "8x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_9X, "9x"); + AppendMenuA(scale_menu, MF_STRING, ID_M_WINDOW_SCALE_10X, "10x"); + AppendMenuA(window_menu, MF_POPUP, (UINT_PTR)scale_menu, "Windowed Scale"); + +#ifdef HAVE_QT + AppendMenuA(window_menu, MF_STRING, ID_M_TOGGLE_DESKTOP, + "Toggle Desktop Menu"); +#endif + AppendMenuA(window_menu, MF_STRING, ID_M_FULL_SCREEN, + "Toggle Exclusive Full Screen"); + AppendMenuA(menu_bar, MF_POPUP, (UINT_PTR)window_menu, "Window"); + + return menu_bar; +} + +/* ---------------------------------------------------------------- + * "PICK CORE" DIALOG (replaces IDD_PICKCORE) + * + * Builds DLGTEMPLATE + DLGITEMTEMPLATE structs in memory and calls + * DialogBoxIndirectParam, so no compiled resource is needed. + * ---------------------------------------------------------------- */ + +/* Align pointer up to DWORD boundary */ +static LPWORD align_dword(LPWORD ptr) +{ + ULONG_PTR ul = (ULONG_PTR)ptr; + ul = (ul + 3) & ~(ULONG_PTR)3; + return (LPWORD)ul; +} + +/* Append a wide string (including NUL) into template buffer */ +static LPWORD append_wstr(LPWORD ptr, const WCHAR *str) +{ + int len = (int)wcslen(str) + 1; + memcpy(ptr, str, len * sizeof(WCHAR)); + return ptr + len; +} + +int win32_resources_pick_core_dialog(HWND parent, DLGPROC dlg_proc) +{ + BYTE buf[2048]; + DLGTEMPLATE *dlg; + LPWORD p; + DLGITEMTEMPLATE *item; + + memset(buf, 0, sizeof(buf)); + dlg = (DLGTEMPLATE *)buf; + + /* Dialog header */ + dlg->style = DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT + | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU; + dlg->dwExtendedStyle = 0; + dlg->cdit = 4; + dlg->x = 0; + dlg->y = 0; + dlg->cx = 225; + dlg->cy = 118; + + p = (LPWORD)(dlg + 1); + *p++ = 0; /* no menu */ + *p++ = 0; /* default class */ + p = append_wstr(p, L"Pick Core"); /* caption */ + *p++ = 8; /* font size */ + p = append_wstr(p, L"Ms Shell Dlg"); /* font name */ + + /* Control 1: LTEXT (static label) */ + p = align_dword(p); + item = (DLGITEMTEMPLATE *)p; + item->style = WS_CHILD | WS_VISIBLE | SS_LEFT; + item->dwExtendedStyle = WS_EX_LEFT; + item->x = 9; item->y = 12; + item->cx = 160; item->cy = 17; + item->id = 0; + p = (LPWORD)(item + 1); + *p++ = 0xFFFF; *p++ = 0x0082; /* STATIC class */ + p = append_wstr(p, + L"Please select a core to use for the content loaded.\n" + L"Otherwise, press 'Cancel' to cancel loading."); + *p++ = 0; /* no creation data */ + + /* Control 2: DEFPUSHBUTTON "OK" */ + p = align_dword(p); + item = (DLGITEMTEMPLATE *)p; + item->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_DEFPUSHBUTTON; + item->dwExtendedStyle = WS_EX_LEFT; + item->x = 170; item->y = 15; + item->cx = 50; item->cy = 14; + item->id = IDOK; + p = (LPWORD)(item + 1); + *p++ = 0xFFFF; *p++ = 0x0080; /* BUTTON class */ + p = append_wstr(p, L"OK"); + *p++ = 0; + + /* Control 3: PUSHBUTTON "Cancel" */ + p = align_dword(p); + item = (DLGITEMTEMPLATE *)p; + item->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON; + item->dwExtendedStyle = WS_EX_LEFT; + item->x = 170; item->y = 32; + item->cx = 50; item->cy = 14; + item->id = IDCANCEL; + p = (LPWORD)(item + 1); + *p++ = 0xFFFF; *p++ = 0x0080; /* BUTTON class */ + p = append_wstr(p, L"Cancel"); + *p++ = 0; + + /* Control 4: LISTBOX (core list) */ + p = align_dword(p); + item = (DLGITEMTEMPLATE *)p; + item->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL + | LBS_NOINTEGRALHEIGHT | LBS_SORT | LBS_NOTIFY; + item->dwExtendedStyle = WS_EX_LEFT; + item->x = 5; item->y = 55; + item->cx = 214; item->cy = 60; + item->id = ID_CORELISTBOX; + p = (LPWORD)(item + 1); + *p++ = 0xFFFF; *p++ = 0x0083; /* LISTBOX class */ + *p++ = 0; /* empty title */ + *p++ = 0; /* no creation data */ + + return (int)DialogBoxIndirectParamW( + GetModuleHandleW(NULL), + dlg, parent, dlg_proc, 0); +} + +/* ---------------------------------------------------------------- + * PUBLIC INIT / FREE + * ---------------------------------------------------------------- */ +void win32_resources_init(void) +{ + apply_dpi_awareness(); + s_accel_table = create_accelerator_table(); +} + +void win32_resources_free(void) +{ + if (s_accel_table) + { + DestroyAcceleratorTable(s_accel_table); + s_accel_table = NULL; + } +} + +HACCEL win32_resources_get_accelerator(void) +{ + return s_accel_table; +} + +#endif /* _WIN32 && !_XBOX && !__WINRT__ */ diff --git a/gfx/common/win32_resources.h b/gfx/common/win32_resources.h new file mode 100644 index 0000000000..d99188b2aa --- /dev/null +++ b/gfx/common/win32_resources.h @@ -0,0 +1,62 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2024 - RetroArch contributors + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +/* Programmatic replacement for the menu, dialog, accelerator, + * and manifest resources that were in media/rarch.rc. + * + * The icon resource remains in rarch.rc (compiled by windres/rc) + * so that the .exe has an embedded icon visible in Explorer. + * Everything else is created at runtime via Win32 API calls. */ + +#ifndef WIN32_RESOURCES_H__ +#define WIN32_RESOURCES_H__ + +#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) + +#include + +#include "../../ui/drivers/ui_win32_resource.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Call once before creating any windows. + * Applies DPI awareness and creates the accelerator table. */ +void win32_resources_init(void); + +/* Release resources created by win32_resources_init(). */ +void win32_resources_free(void); + +/* Build the application menu bar programmatically + * (replaces LoadMenu + MAKEINTRESOURCE(IDR_MENU)). + * Returns a fresh HMENU each call — caller owns it. */ +HMENU win32_resources_create_menu(void); + +/* Return the accelerator table + * (replaces LoadAccelerators + MAKEINTRESOURCE(IDR_ACCELERATOR1)). */ +HACCEL win32_resources_get_accelerator(void); + +/* Show the "Pick Core" dialog built in memory + * (replaces DialogBoxParam + MAKEINTRESOURCE(IDD_PICKCORE)). + * Returns IDOK or IDCANCEL. */ +int win32_resources_pick_core_dialog(HWND parent, DLGPROC dlg_proc); + +#ifdef __cplusplus +} +#endif + +#endif /* _WIN32 && !_XBOX && !__WINRT__ */ +#endif /* WIN32_RESOURCES_H__ */ diff --git a/griffin/griffin.c b/griffin/griffin.c index b83899db0f..4dc3d620cc 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -261,6 +261,7 @@ CHEATS UI COMMON CONTEXT ============================================================ */ #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) +#include "../gfx/common/win32_resources.c" #include "../gfx/common/win32_common.c" #endif diff --git a/media/rarch.manifest b/media/rarch.manifest deleted file mode 100644 index aad83c561a..0000000000 --- a/media/rarch.manifest +++ /dev/null @@ -1,8 +0,0 @@ - - - - - true - - - diff --git a/media/rarch.rc b/media/rarch.rc index 02867a4382..659751408a 100644 --- a/media/rarch.rc +++ b/media/rarch.rc @@ -1,121 +1,17 @@ -// Generated by ResEdit 1.6.6 -// Copyright (C) 2006-2015 -// http://www.resedit.net -#include "../ui/drivers/ui_win32_resource.h" +// RetroArch icon resource +// +// This is the only resource that must remain in the .rc file: +// the icon must be embedded in the PE executable so that Windows +// can display it in Explorer, the taskbar, and Alt+Tab without +// running the program. +// +// All other resources (menus, dialogs, accelerators, manifest) +// are now created programmatically — see gfx/common/win32_resources.c + #include -// Menu resources -// -LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL -IDR_MENU MENU -{ - POPUP "File" - { - MENUITEM "Load Core...", ID_M_LOAD_CORE - MENUITEM "Load Content...", ID_M_LOAD_CONTENT - MENUITEM SEPARATOR - MENUITEM "Close", ID_M_QUIT - } - POPUP "Command" - { - POPUP "Audio Options" - { - MENUITEM "Audio Mute Toggle", ID_M_MUTE_TOGGLE - } - POPUP "Disk Options" - { - MENUITEM "Disk Eject Toggle", ID_M_DISK_CYCLE - MENUITEM "Disk Previous", ID_M_DISK_PREV - MENUITEM "Disk Next", ID_M_DISK_NEXT - } - POPUP "Save State Options" - { - POPUP "State Index" - { - MENUITEM "Auto", ID_M_STATE_INDEX_AUTO - MENUITEM "0", ID_M_STATE_INDEX_0 - MENUITEM "1", ID_M_STATE_INDEX_1 - MENUITEM "2", ID_M_STATE_INDEX_2 - MENUITEM "3", ID_M_STATE_INDEX_3 - MENUITEM "4", ID_M_STATE_INDEX_4 - MENUITEM "5", ID_M_STATE_INDEX_5 - MENUITEM "6", ID_M_STATE_INDEX_6 - MENUITEM "7", ID_M_STATE_INDEX_7 - MENUITEM "8", ID_M_STATE_INDEX_8 - MENUITEM "9", ID_M_STATE_INDEX_9 - } - MENUITEM "Load State", ID_M_LOAD_STATE - MENUITEM "Save State", ID_M_SAVE_STATE - } - MENUITEM "Reset", ID_M_RESET - MENUITEM "Pause Toggle", ID_M_PAUSE_TOGGLE - MENUITEM "Menu Toggle", ID_M_MENU_TOGGLE - MENUITEM "Take Screenshot", ID_M_TAKE_SCREENSHOT - MENUITEM "Mouse Grab Toggle", ID_M_MOUSE_GRAB - } - POPUP "Window" - { - POPUP "Windowed Scale" - { - MENUITEM "1x", ID_M_WINDOW_SCALE_1X - MENUITEM "2x", ID_M_WINDOW_SCALE_2X - MENUITEM "3x", ID_M_WINDOW_SCALE_3X - MENUITEM "4x", ID_M_WINDOW_SCALE_4X - MENUITEM "5x", ID_M_WINDOW_SCALE_5X - MENUITEM "6x", ID_M_WINDOW_SCALE_6X - MENUITEM "7x", ID_M_WINDOW_SCALE_7X - MENUITEM "8x", ID_M_WINDOW_SCALE_8X - MENUITEM "9x", ID_M_WINDOW_SCALE_9X - MENUITEM "10x", ID_M_WINDOW_SCALE_10X - } -#ifdef HAVE_QT - MENUITEM "Toggle Desktop Menu", ID_M_TOGGLE_DESKTOP -#endif - MENUITEM "Toggle Exclusive Full Screen", ID_M_FULL_SCREEN - // Shader dialog is disabled for now, until video_threaded issues are fixed. - //MENUITEM "Shader Parameters", ID_M_SHADER_PARAMETERS - } -} - -// -// Dialog resources -// -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -IDD_PICKCORE DIALOG 0, 0, 225, 118 -STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU -CAPTION "Pick Core" -FONT 8, "Ms Shell Dlg" -{ - LISTBOX ID_CORELISTBOX, 5, 55, 214, 60, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_SORT | LBS_NOTIFY, WS_EX_LEFT - DEFPUSHBUTTON "OK", IDOK, 170, 15, 50, 14, 0, WS_EX_LEFT - PUSHBUTTON "Cancel", IDCANCEL, 170, 32, 50, 14, 0, WS_EX_LEFT - LTEXT "Please select a core to use for the content loaded.\nOtherwise, press 'Cancel' to cancel loading.", 0, 9, 12, 160, 17, SS_LEFT, WS_EX_LEFT -} - // // Icon resources // LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 1 ICON "retroarch.ico" - -// -// Manifest resources -// -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -2 RT_MANIFEST "rarch.manifest" - - -// -// Accelerator -// - -IDR_ACCELERATOR1 ACCELERATORS -BEGIN -"O", ID_M_LOAD_CONTENT, VIRTKEY, CONTROL, NOINVERT -VK_RETURN, ID_M_FULL_SCREEN, VIRTKEY, ALT, NOINVERT -END - -// Per the documentation, this should be used before including resource files. -// https://docs.microsoft.com/en-us/windows/desktop/menurc/pragma-directives -#pragma code_page(932) -#include "rarch_ja.rc" diff --git a/media/rarch_ja.rc b/media/rarch_ja.rc deleted file mode 100644 index 24aaa9255c..0000000000 --- a/media/rarch_ja.rc +++ /dev/null @@ -1,90 +0,0 @@ -// Menu resources (Japanese) -// -// The encoding for this file is CP932. -#pragma code_page(932) - -LANGUAGE LANG_JAPANESE, SUBLANG_NEUTRAL -IDR_MENU MENU -{ - POPUP "ƒtƒ@ƒCƒ‹" - { - MENUITEM "ƒRƒA‚ðƒ��[ƒh...", ID_M_LOAD_CORE - MENUITEM "ƒRƒ“ƒeƒ“ƒc‚ðƒ��[ƒh...", ID_M_LOAD_CONTENT - MENUITEM SEPARATOR - MENUITEM "�I—¹", ID_M_QUIT - } - POPUP "ƒRƒ}ƒ“ƒh" - { - POPUP "ƒI�[ƒfƒBƒI�Ý’è" - { - MENUITEM "ƒI�[ƒfƒBƒI‚ð�Á‰¹", ID_M_MUTE_TOGGLE - } - POPUP "ƒfƒBƒXƒN‘€�ì" - { - MENUITEM "ƒfƒBƒXƒNŽæ‚è�o‚µ", ID_M_DISK_CYCLE - MENUITEM "‘O‚̃fƒBƒXƒN", ID_M_DISK_PREV - MENUITEM "ŽŸ‚̃fƒBƒXƒN", ID_M_DISK_NEXT - } - POPUP "•Û‘¶�ó‘Ô�Ý’è" - { - POPUP "�ó‘Ԃ̃Cƒ“ƒfƒbƒNƒX" - { - MENUITEM "Ž©“®", ID_M_STATE_INDEX_AUTO - MENUITEM "0", ID_M_STATE_INDEX_0 - MENUITEM "1", ID_M_STATE_INDEX_1 - MENUITEM "2", ID_M_STATE_INDEX_2 - MENUITEM "3", ID_M_STATE_INDEX_3 - MENUITEM "4", ID_M_STATE_INDEX_4 - MENUITEM "5", ID_M_STATE_INDEX_5 - MENUITEM "6", ID_M_STATE_INDEX_6 - MENUITEM "7", ID_M_STATE_INDEX_7 - MENUITEM "8", ID_M_STATE_INDEX_8 - MENUITEM "9", ID_M_STATE_INDEX_9 - } - MENUITEM "•Û‘¶�ó‘Ô‚ðƒ��[ƒh", ID_M_LOAD_STATE - MENUITEM "�ó‘Ô•Û‘¶", ID_M_SAVE_STATE - } - MENUITEM "ƒŠƒZƒbƒg", ID_M_RESET - MENUITEM "ˆêŽž’âŽ~", ID_M_PAUSE_TOGGLE - MENUITEM "ƒ�ƒjƒ…�[‚É�Ø‚è‘Ö‚¦", ID_M_MENU_TOGGLE - MENUITEM "ƒXƒNƒŠ�[ƒ“ƒVƒ‡ƒbƒg‚ðŽB‚é", ID_M_TAKE_SCREENSHOT - MENUITEM "ƒ}ƒEƒXƒOƒ‰ƒu�Ø‚è‘Ö‚¦", ID_M_MOUSE_GRAB - } - POPUP "ƒEƒBƒ“ƒhƒE" - { - POPUP "ƒEƒBƒ“ƒhƒE‚̃XƒP�[ƒ‹" - { - MENUITEM "1x", ID_M_WINDOW_SCALE_1X - MENUITEM "2x", ID_M_WINDOW_SCALE_2X - MENUITEM "3x", ID_M_WINDOW_SCALE_3X - MENUITEM "4x", ID_M_WINDOW_SCALE_4X - MENUITEM "5x", ID_M_WINDOW_SCALE_5X - MENUITEM "6x", ID_M_WINDOW_SCALE_6X - MENUITEM "7x", ID_M_WINDOW_SCALE_7X - MENUITEM "8x", ID_M_WINDOW_SCALE_8X - MENUITEM "9x", ID_M_WINDOW_SCALE_9X - MENUITEM "10x", ID_M_WINDOW_SCALE_10X - } -#ifdef HAVE_QT - MENUITEM "ƒfƒXƒNƒgƒbƒvƒ�ƒjƒ…�[‚ð•\ަ", ID_M_TOGGLE_DESKTOP -#endif - MENUITEM "”r‘¼“I‚ȃtƒ‹ƒXƒNƒŠ�[ƒ“�Ø‚è‘Ö‚¦", ID_M_FULL_SCREEN - // Shader dialog is disabled for now, until video_threaded issues are fixed. - //MENUITEM "ƒVƒF�[ƒ_�[‚̃pƒ‰ƒ��[ƒ^", ID_M_SHADER_PARAMETERS - } -} - -// -// Dialog resources -// -LANGUAGE LANG_JAPANESE, SUBLANG_NEUTRAL -IDD_PICKCORE DIALOG 0, 0, 225, 118 -STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU -CAPTION "ƒRƒA‘I‘ð" -FONT 8, "Ms Shell Dlg" -{ - LISTBOX ID_CORELISTBOX, 5, 55, 214, 60, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_SORT | LBS_NOTIFY, WS_EX_LEFT - DEFPUSHBUTTON "OK", IDOK, 170, 15, 50, 14, 0, WS_EX_LEFT - PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹", IDCANCEL, 170, 32, 50, 14, 0, WS_EX_LEFT - LTEXT "ƒRƒ“ƒeƒ“ƒc‚ÉŽg—p‚·‚éƒRƒA‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢�B", 0, 9, 12, 160, 17, SS_LEFT, WS_EX_LEFT -}