mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
unicode-ify a couple other windows files, start changing function names to W version explicitly
This commit is contained in:
parent
dc99713a9b
commit
367dea6723
@ -222,7 +222,8 @@ void fill_pathname_application_path(char *s, size_t len)
|
||||
#ifdef _WIN32
|
||||
MultiByteToWideChar(CP_UTF8, 0, s, -1, ws, sizeof(ws) / sizeof(ws[0]));
|
||||
|
||||
ret = GetModuleFileName(GetModuleHandle(NULL), ws, len - 1);
|
||||
|
||||
ret = GetModuleFileNameW(GetModuleHandleW(NULL), ws, sizeof(ws) / sizeof(ws[0]));
|
||||
s[ret] = '\0';
|
||||
#elif defined(__APPLE__)
|
||||
if (bundle)
|
||||
|
@ -177,7 +177,7 @@ static void frontend_win32_init(void *data)
|
||||
{
|
||||
typedef BOOL (WINAPI *isProcessDPIAwareProc)();
|
||||
typedef BOOL (WINAPI *setProcessDPIAwareProc)();
|
||||
HMODULE handle = GetModuleHandle(TEXT("User32.dll"));
|
||||
HMODULE handle = GetModuleHandleW(L"User32.dll");
|
||||
isProcessDPIAwareProc isDPIAwareProc = (isProcessDPIAwareProc)dylib_proc(handle, "IsProcessDPIAware");
|
||||
setProcessDPIAwareProc setDPIAwareProc = (setProcessDPIAwareProc)dylib_proc(handle, "SetProcessDPIAware");
|
||||
|
||||
@ -338,7 +338,7 @@ static void frontend_win32_detach_console(void)
|
||||
{
|
||||
HWND wnd = GetConsoleWindow();
|
||||
FreeConsole();
|
||||
PostMessage(wnd, WM_CLOSE, 0, 0);
|
||||
PostMessageW(wnd, WM_CLOSE, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -212,20 +212,20 @@ void win32_monitor_from_window(void)
|
||||
|
||||
void win32_monitor_get_info(void)
|
||||
{
|
||||
MONITORINFOEX current_mon;
|
||||
MONITORINFOEXW current_mon;
|
||||
|
||||
memset(¤t_mon, 0, sizeof(current_mon));
|
||||
current_mon.cbSize = sizeof(MONITORINFOEX);
|
||||
current_mon.cbSize = sizeof(MONITORINFOEXW);
|
||||
|
||||
GetMonitorInfo(win32_monitor_last, (MONITORINFO*)¤t_mon);
|
||||
ChangeDisplaySettingsEx(current_mon.szDevice, NULL, NULL, 0, NULL);
|
||||
GetMonitorInfoW(win32_monitor_last, (MONITORINFOEXW*)¤t_mon);
|
||||
ChangeDisplaySettingsExW(current_mon.szDevice, NULL, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id)
|
||||
{
|
||||
unsigned i, fs_monitor;
|
||||
settings_t *settings = config_get_ptr();
|
||||
MONITORINFOEX *mon = (MONITORINFOEX*)data;
|
||||
MONITORINFOEXW *mon = (MONITORINFOEXW*)data;
|
||||
HMONITOR *hm_to_use = (HMONITOR*)hm_data;
|
||||
|
||||
if (!win32_monitor_last)
|
||||
@ -254,8 +254,8 @@ void win32_monitor_info(void *data, void *hm_data, unsigned *mon_id)
|
||||
}
|
||||
|
||||
memset(mon, 0, sizeof(*mon));
|
||||
mon->cbSize = sizeof(MONITORINFOEX);
|
||||
GetMonitorInfo(*hm_to_use, (MONITORINFO*)mon);
|
||||
mon->cbSize = sizeof(MONITORINFOEXW);
|
||||
GetMonitorInfoW(*hm_to_use, (MONITORINFOEXW*)mon);
|
||||
}
|
||||
|
||||
/* Get the count of the files dropped */
|
||||
@ -264,7 +264,7 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
char szFilename[1024] = {0};
|
||||
wchar_t wszFilename[1024] = {0};
|
||||
|
||||
if (DragQueryFile((HDROP)wparam, 0xFFFFFFFF, NULL, 0))
|
||||
if (DragQueryFileW((HDROP)wparam, 0xFFFFFFFF, NULL, 0))
|
||||
{
|
||||
/*poll list of current cores */
|
||||
size_t list_size;
|
||||
@ -272,7 +272,7 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
const core_info_t *core_info = NULL;
|
||||
|
||||
DragQueryFile((HDROP)wparam, 0, wszFilename, sizeof(wszFilename) / sizeof(wszFilename[0]));
|
||||
DragQueryFileW((HDROP)wparam, 0, wszFilename, sizeof(wszFilename) / sizeof(wszFilename[0]));
|
||||
|
||||
utf16_to_char_string((const uint16_t*)wszFilename, szFilename, sizeof(szFilename));
|
||||
|
||||
@ -335,7 +335,7 @@ static int win32_drag_query_file(HWND hwnd, WPARAM wparam)
|
||||
else
|
||||
{
|
||||
/* Pick one core that could be compatible, ew */
|
||||
if(DialogBoxParam(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_PICKCORE),
|
||||
if(DialogBoxParamW(GetModuleHandleW(NULL),MAKEINTRESOURCE(IDD_PICKCORE),
|
||||
hwnd,PickCoreProc,(LPARAM)NULL)==IDOK)
|
||||
{
|
||||
task_push_content_load_default(
|
||||
@ -507,7 +507,7 @@ LRESULT CALLBACK WndProcGL(HWND hwnd, UINT message,
|
||||
|
||||
if (dinput_wgl && dinput_handle_message(dinput_wgl, message, wparam, lparam))
|
||||
return 0;
|
||||
return DefWindowProc(hwnd, message, wparam, lparam);
|
||||
return DefWindowProcW(hwnd, message, wparam, lparam);
|
||||
}
|
||||
|
||||
bool win32_window_create(void *data, unsigned style,
|
||||
@ -515,7 +515,7 @@ bool win32_window_create(void *data, unsigned style,
|
||||
unsigned height, bool fullscreen)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
main_window.hwnd = CreateWindowEx(0, L"RetroArch", L"RetroArch",
|
||||
main_window.hwnd = CreateWindowExW(0, L"RetroArch", L"RetroArch",
|
||||
style,
|
||||
fullscreen ? mon_rect->left : g_pos_x,
|
||||
fullscreen ? mon_rect->top : g_pos_y,
|
||||
@ -597,7 +597,7 @@ static bool win32_monitor_set_fullscreen(unsigned width, unsigned height,
|
||||
|
||||
MultiByteToWideChar(CP_UTF8, 0, dev_name, -1, dev_name_wide, sizeof(dev_name_wide) / sizeof(dev_name_wide[0]));
|
||||
|
||||
return ChangeDisplaySettingsEx(dev_name_wide, &devmode,
|
||||
return ChangeDisplaySettingsExW(dev_name_wide, &devmode,
|
||||
NULL, CDS_FULLSCREEN, NULL) == DISP_CHANGE_SUCCESSFUL;
|
||||
#endif
|
||||
}
|
||||
@ -724,7 +724,7 @@ void win32_set_style(MONITORINFOEXW *current_mon, HMONITOR *hm_to_use,
|
||||
{}
|
||||
|
||||
/* Display settings might have changed, get new coordinates. */
|
||||
GetMonitorInfo(*hm_to_use, (MONITORINFO*)current_mon);
|
||||
GetMonitorInfoW(*hm_to_use, (MONITORINFOEXW*)current_mon);
|
||||
*mon_rect = current_mon->rcMonitor;
|
||||
}
|
||||
}
|
||||
@ -755,8 +755,8 @@ void win32_set_window(unsigned *width, unsigned *height,
|
||||
{
|
||||
RECT rc_temp = {0, 0, (LONG)*height, 0x7FFF};
|
||||
SetMenu(main_window.hwnd,
|
||||
LoadMenu(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_MENU)));
|
||||
SendMessage(main_window.hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rc_temp);
|
||||
LoadMenuW(GetModuleHandleW(NULL),MAKEINTRESOURCE(IDR_MENU)));
|
||||
SendMessageW(main_window.hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&rc_temp);
|
||||
g_resize_height = *height += rc_temp.top + rect->top;
|
||||
SetWindowPos(main_window.hwnd, NULL, 0, 0, *width, *height, SWP_NOMOVE);
|
||||
}
|
||||
@ -782,7 +782,7 @@ bool win32_set_video_mode(void *data,
|
||||
MSG msg;
|
||||
RECT mon_rect;
|
||||
unsigned mon_id;
|
||||
MONITORINFOEX current_mon;
|
||||
MONITORINFOEXW current_mon;
|
||||
bool windowed_full;
|
||||
RECT rect = {0};
|
||||
HMONITOR hm_to_use = NULL;
|
||||
@ -805,10 +805,10 @@ bool win32_set_video_mode(void *data,
|
||||
win32_set_window(&width, &height, fullscreen, windowed_full, &rect);
|
||||
|
||||
/* Wait until context is created (or failed to do so ...) */
|
||||
while (!g_inited && !g_quit && GetMessage(&msg, main_window.hwnd, 0, 0))
|
||||
while (!g_inited && !g_quit && GetMessageW(&msg, main_window.hwnd, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
DispatchMessageW(&msg);
|
||||
}
|
||||
|
||||
if (g_quit)
|
||||
@ -866,7 +866,7 @@ void win32_window_reset(void)
|
||||
void win32_destroy_window(void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
UnregisterClass(L"RetroArch", GetModuleHandle(NULL));
|
||||
UnregisterClassW(L"RetroArch", GetModuleHandleW(NULL));
|
||||
#endif
|
||||
main_window.hwnd = NULL;
|
||||
}
|
||||
|
@ -23,6 +23,10 @@
|
||||
#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K
|
||||
#endif
|
||||
|
||||
#define UNICODE
|
||||
#include <tchar.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -29,6 +29,10 @@
|
||||
#define WM_MOUSEWHEEL 0x020A
|
||||
#endif
|
||||
|
||||
#define UNICODE
|
||||
#include <tchar.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <dinput.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -44,7 +44,7 @@ struct RDIR *retro_opendir(const char *name)
|
||||
#if defined(_WIN32)
|
||||
snprintf(path_buf, sizeof(path_buf), "%s\\*", name);
|
||||
MultiByteToWideChar(CP_UTF8, 0, path_buf, -1, pathW, sizeof(pathW) / sizeof(pathW[0]));
|
||||
rdir->directory = FindFirstFile(pathW, &rdir->entry);
|
||||
rdir->directory = FindFirstFileW(pathW, &rdir->entry);
|
||||
#elif defined(VITA) || defined(PSP)
|
||||
rdir->directory = sceIoDopen(name);
|
||||
#elif defined(_3DS)
|
||||
@ -77,7 +77,7 @@ int retro_readdir(struct RDIR *rdir)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
if(rdir->next)
|
||||
return (FindNextFile(rdir->directory, &rdir->entry) != 0);
|
||||
return (FindNextFileW(rdir->directory, &rdir->entry) != 0);
|
||||
else {
|
||||
rdir->next = true;
|
||||
return (rdir->directory != INVALID_HANDLE_VALUE);
|
||||
@ -120,7 +120,7 @@ const char *retro_dirent_get_name(struct RDIR *rdir)
|
||||
bool retro_dirent_is_dir(struct RDIR *rdir, const char *path)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
const WIN32_FIND_DATA *entry = (const WIN32_FIND_DATA*)&rdir->entry;
|
||||
const WIN32_FIND_DATAW *entry = (const WIN32_FIND_DATAW*)&rdir->entry;
|
||||
return entry->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
const SceIoDirent *entry = (const SceIoDirent*)&rdir->entry;
|
||||
|
@ -107,7 +107,7 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
|
||||
|
||||
MultiByteToWideChar(CP_UTF8, 0, path, -1, path_wide, sizeof(path_wide) / sizeof(path_wide[0]));
|
||||
|
||||
DWORD ret = GetFileAttributesEx(path_wide, fInfoLevelId, &file_info);
|
||||
DWORD ret = GetFileAttributesExW(path_wide, fInfoLevelId, &file_info);
|
||||
if (ret == 0)
|
||||
return false;
|
||||
#else
|
||||
|
@ -155,20 +155,20 @@ static void shader_dlg_params_refresh(void)
|
||||
bool checked =
|
||||
(shader_info.data->parameters[i].current ==
|
||||
shader_info.data->parameters[i].maximum);
|
||||
SendMessage(control->checkbox.hwnd, BM_SETCHECK, checked, 0);
|
||||
SendMessageW(control->checkbox.hwnd, BM_SETCHECK, checked, 0);
|
||||
}
|
||||
break;
|
||||
case SHADER_PARAM_CTRL_TRACKBAR:
|
||||
shader_dlg_refresh_trackbar_label(i);
|
||||
|
||||
SendMessage(control->trackbar.hwnd,
|
||||
SendMessageW(control->trackbar.hwnd,
|
||||
TBM_SETRANGEMIN, (WPARAM)TRUE, (LPARAM)0);
|
||||
SendMessage(control->trackbar.hwnd,
|
||||
SendMessageW(control->trackbar.hwnd,
|
||||
TBM_SETRANGEMAX, (WPARAM)TRUE,
|
||||
(LPARAM)((shader_info.data->parameters[i].maximum -
|
||||
shader_info.data->parameters[i].minimum)
|
||||
/ shader_info.data->parameters[i].step));
|
||||
SendMessage(control->trackbar.hwnd, TBM_SETPOS, (WPARAM)TRUE,
|
||||
SendMessageW(control->trackbar.hwnd, TBM_SETPOS, (WPARAM)TRUE,
|
||||
(LPARAM)((shader_info.data->parameters[i].current -
|
||||
shader_info.data->parameters[i].minimum) /
|
||||
shader_info.data->parameters[i].step));
|
||||
@ -255,12 +255,12 @@ void shader_dlg_params_reload(void)
|
||||
}
|
||||
|
||||
control->type = SHADER_PARAM_CTRL_CHECKBOX;
|
||||
control->checkbox.hwnd = CreateWindowEx(0, L"BUTTON",
|
||||
control->checkbox.hwnd = CreateWindowExW(0, L"BUTTON",
|
||||
param_desc_wide,
|
||||
WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX, pos_x, pos_y,
|
||||
SHADER_DLG_CTRL_WIDTH, SHADER_DLG_CHECKBOX_HEIGHT,
|
||||
g_shader_dlg.window.hwnd, (HMENU)(size_t)i, NULL, NULL);
|
||||
SendMessage(control->checkbox.hwnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
SendMessageW(control->checkbox.hwnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
pos_y += SHADER_DLG_CHECKBOX_HEIGHT + SHADER_DLG_CTRL_MARGIN;
|
||||
}
|
||||
else
|
||||
@ -273,27 +273,27 @@ void shader_dlg_params_reload(void)
|
||||
}
|
||||
|
||||
control->type = SHADER_PARAM_CTRL_TRACKBAR;
|
||||
control->trackbar.label_title = CreateWindowEx(0, L"STATIC",
|
||||
control->trackbar.label_title = CreateWindowExW(0, L"STATIC",
|
||||
param_desc_wide,
|
||||
WS_CHILD | WS_VISIBLE | SS_LEFT, pos_x, pos_y,
|
||||
SHADER_DLG_CTRL_WIDTH, SHADER_DLG_LABEL_HEIGHT, g_shader_dlg.window.hwnd,
|
||||
(HMENU)(size_t)i, NULL, NULL);
|
||||
SendMessage(control->trackbar.label_title, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
SendMessageW(control->trackbar.label_title, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
|
||||
pos_y += SHADER_DLG_LABEL_HEIGHT;
|
||||
control->trackbar.hwnd = CreateWindowEx(0, TRACKBAR_CLASS, L"",
|
||||
control->trackbar.hwnd = CreateWindowExW(0, TRACKBAR_CLASS, L"",
|
||||
WS_CHILD | WS_VISIBLE | TBS_HORZ | TBS_NOTICKS,
|
||||
pos_x + SHADER_DLG_TRACKBAR_LABEL_WIDTH, pos_y,
|
||||
SHADER_DLG_TRACKBAR_WIDTH, SHADER_DLG_TRACKBAR_HEIGHT,
|
||||
g_shader_dlg.window.hwnd, (HMENU)(size_t)i, NULL, NULL);
|
||||
|
||||
control->trackbar.label_val = CreateWindowEx(0, L"STATIC", L"",
|
||||
control->trackbar.label_val = CreateWindowExW(0, L"STATIC", L"",
|
||||
WS_CHILD | WS_VISIBLE | SS_LEFT, pos_x,
|
||||
pos_y, SHADER_DLG_TRACKBAR_LABEL_WIDTH, SHADER_DLG_LABEL_HEIGHT,
|
||||
g_shader_dlg.window.hwnd, (HMENU)(size_t)i, NULL, NULL);
|
||||
SendMessage(control->trackbar.label_val, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
SendMessageW(control->trackbar.label_val, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
|
||||
SendMessage(control->trackbar.hwnd, TBM_SETBUDDY, (WPARAM)TRUE,
|
||||
SendMessageW(control->trackbar.hwnd, TBM_SETBUDDY, (WPARAM)TRUE,
|
||||
(LPARAM)control->trackbar.label_val);
|
||||
|
||||
pos_y += SHADER_DLG_TRACKBAR_HEIGHT + SHADER_DLG_CTRL_MARGIN;
|
||||
@ -305,7 +305,7 @@ void shader_dlg_params_reload(void)
|
||||
if (window && g_shader_dlg.separator.hwnd)
|
||||
window->destroy(&g_shader_dlg.separator);
|
||||
|
||||
g_shader_dlg.separator.hwnd = CreateWindowEx(0, L"STATIC", L"",
|
||||
g_shader_dlg.separator.hwnd = CreateWindowExW(0, L"STATIC", L"",
|
||||
SS_ETCHEDHORZ | WS_VISIBLE | WS_CHILD, SHADER_DLG_CTRL_X,
|
||||
g_shader_dlg.parameters_start_y - SHADER_DLG_CTRL_MARGIN - SHADER_DLG_SEPARATOR_HEIGHT / 2,
|
||||
(pos_x - SHADER_DLG_CTRL_X) + SHADER_DLG_CTRL_WIDTH,
|
||||
@ -395,7 +395,7 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message,
|
||||
if (g_shader_dlg.controls[i].type != SHADER_PARAM_CTRL_CHECKBOX)
|
||||
break;
|
||||
|
||||
if (SendMessage(g_shader_dlg.controls[i].checkbox.hwnd,
|
||||
if (SendMessageW(g_shader_dlg.controls[i].checkbox.hwnd,
|
||||
BM_GETCHECK, 0, 0) == BST_CHECKED)
|
||||
shader_info.data->parameters[i].current =
|
||||
shader_info.data->parameters[i].maximum;
|
||||
@ -406,7 +406,7 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message,
|
||||
break;
|
||||
|
||||
case WM_HSCROLL:
|
||||
i = GetWindowLong((HWND)lparam, GWL_ID);
|
||||
i = GetWindowLongW((HWND)lparam, GWL_ID);
|
||||
|
||||
if (i >= GFX_MAX_PARAMETERS)
|
||||
break;
|
||||
@ -414,7 +414,7 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message,
|
||||
if (g_shader_dlg.controls[i].type != SHADER_PARAM_CTRL_TRACKBAR)
|
||||
break;
|
||||
|
||||
pos = (int)SendMessage(g_shader_dlg.controls[i].trackbar.hwnd, TBM_GETPOS, 0, 0);
|
||||
pos = (int)SendMessageW(g_shader_dlg.controls[i].trackbar.hwnd, TBM_GETPOS, 0, 0);
|
||||
shader_info.data->parameters[i].current =
|
||||
shader_info.data->parameters[i].minimum + pos * shader_info.data->parameters[i].step;
|
||||
|
||||
@ -423,7 +423,7 @@ static LRESULT CALLBACK ShaderDlgWndProc(HWND hwnd, UINT message,
|
||||
|
||||
}
|
||||
|
||||
return DefWindowProc(hwnd, message, wparam, lparam);
|
||||
return DefWindowProcW(hwnd, message, wparam, lparam);
|
||||
}
|
||||
|
||||
bool win32_window_init(WNDCLASSEX *wndclass,
|
||||
@ -436,11 +436,11 @@ bool win32_window_init(WNDCLASSEX *wndclass,
|
||||
|
||||
wndclass->cbSize = sizeof(WNDCLASSEX);
|
||||
wndclass->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
||||
wndclass->hInstance = GetModuleHandle(NULL);
|
||||
wndclass->hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wndclass->hInstance = GetModuleHandleW(NULL);
|
||||
wndclass->hCursor = LoadCursorW(NULL, IDC_ARROW);
|
||||
wndclass->lpszClassName = (class_name != NULL) ? class_name_wide : L"RetroArch";
|
||||
wndclass->hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON));
|
||||
wndclass->hIconSm = (HICON)LoadImage(GetModuleHandle(NULL),
|
||||
wndclass->hIcon = LoadIconW(GetModuleHandleW(NULL), MAKEINTRESOURCE(IDI_ICON));
|
||||
wndclass->hIconSm = (HICON)LoadImageW(GetModuleHandleW(NULL),
|
||||
MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0);
|
||||
if (!fullscreen)
|
||||
wndclass->hbrBackground = (HBRUSH)COLOR_WINDOW;
|
||||
@ -448,7 +448,7 @@ bool win32_window_init(WNDCLASSEX *wndclass,
|
||||
if (class_name != NULL)
|
||||
wndclass->style |= CS_CLASSDC;
|
||||
|
||||
if (!RegisterClassEx(wndclass))
|
||||
if (!RegisterClassExW(wndclass))
|
||||
return false;
|
||||
|
||||
/* This is non-NULL when we want a window for shader dialogs,
|
||||
@ -473,7 +473,7 @@ bool win32_shader_dlg_init(void)
|
||||
|
||||
if (!inited)
|
||||
{
|
||||
WNDCLASSEX wc_shader_dlg = {0};
|
||||
WNDCLASSEXW wc_shader_dlg = {0};
|
||||
INITCOMMONCONTROLSEX comm_ctrl_init = {0};
|
||||
|
||||
comm_ctrl_init.dwSize = sizeof(comm_ctrl_init);
|
||||
@ -493,19 +493,19 @@ bool win32_shader_dlg_init(void)
|
||||
|
||||
hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
|
||||
|
||||
g_shader_dlg.window.hwnd = CreateWindowEx(0, L"Shader Dialog", L"Shader Parameters",
|
||||
g_shader_dlg.window.hwnd = CreateWindowExW(0, L"Shader Dialog", L"Shader Parameters",
|
||||
WS_POPUPWINDOW | WS_CAPTION, 100, 100,
|
||||
SHADER_DLG_WIDTH, SHADER_DLG_MIN_HEIGHT, NULL, NULL, NULL, NULL);
|
||||
|
||||
pos_y = SHADER_DLG_CTRL_MARGIN;
|
||||
g_shader_dlg.on_top_checkbox.hwnd = CreateWindowEx(0, L"BUTTON", L"Always on Top",
|
||||
g_shader_dlg.on_top_checkbox.hwnd = CreateWindowExW(0, L"BUTTON", L"Always on Top",
|
||||
BS_AUTOCHECKBOX | WS_VISIBLE | WS_CHILD,
|
||||
SHADER_DLG_CTRL_X, pos_y, SHADER_DLG_CTRL_WIDTH,
|
||||
SHADER_DLG_CHECKBOX_HEIGHT, g_shader_dlg.window.hwnd,
|
||||
(HMENU)SHADER_DLG_CHECKBOX_ONTOP_ID, NULL, NULL);
|
||||
pos_y += SHADER_DLG_CHECKBOX_HEIGHT + SHADER_DLG_CTRL_MARGIN;
|
||||
|
||||
SendMessage(g_shader_dlg.on_top_checkbox.hwnd,
|
||||
SendMessageW(g_shader_dlg.on_top_checkbox.hwnd,
|
||||
WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0));
|
||||
|
||||
pos_y += SHADER_DLG_SEPARATOR_HEIGHT + SHADER_DLG_CTRL_MARGIN;
|
||||
@ -676,7 +676,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
command_event(cmd, NULL);
|
||||
|
||||
if (do_wm_close)
|
||||
PostMessage(owner, WM_CLOSE, 0, 0);
|
||||
PostMessageW(owner, WM_CLOSE, 0, 0);
|
||||
|
||||
return 0L;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user