Various fixes, resulting from (more) Linux work.

Upstream commits applied.
This commit is contained in:
waltje
2018-10-08 02:27:07 -04:00
parent 6a6f23fe68
commit 5d6b369df8
15 changed files with 343 additions and 214 deletions

View File

@@ -8,7 +8,7 @@
*
* Platform main support module for Windows.
*
* Version: @(#)win.c 1.0.20 2018/10/05
* Version: @(#)win.c 1.0.21 2018/10/07
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -206,7 +206,7 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow)
pc_version("Windows");
/* Set up the basic pathname info for the application. */
(void)pc_setup(0, NULL);
(void)pc_setup(0, (wchar_t **)stdout);
/* Set this to the default value (windowed mode). */
vid_fullscreen = 0;

View File

@@ -8,7 +8,7 @@
*
* Handle language support for the platform.
*
* Version: @(#)win_lang.c 1.0.6 2018/10/05
* Version: @(#)win_lang.c 1.0.7 2018/10/07
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -119,7 +119,7 @@ plat_lang_scan(void)
lflen = wcslen(LANG_FILE);
/* Open the "language modules" directory. */
swprintf(path, sizeof_w(temp), L"%ls%ls", exe_path, LANGUAGE_PATH);
swprintf(path, sizeof_w(path), L"%ls%ls", exe_path, LANGUAGE_PATH);
dir = opendir(path);
if (dir != NULL) {
/* Scan all files, and see if we find a usable one. */

View File

@@ -12,7 +12,7 @@
* Windows and UNIX systems, with support for FTDI and Prolific
* USB ports. Support for these has been removed.
*
* Version: @(#)win_serial.c 1.0.3 2018/05/06
* Version: @(#)win_serial.c 1.0.4 2018/10/07
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*

View File

@@ -8,7 +8,7 @@
*
* Implementation of the Settings dialog.
*
* Version: @(#)win_settings_disk.h 1.0.14 2018/09/22
* Version: @(#)win_settings_disk.h 1.0.15 2018/10/07
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>

View File

@@ -8,7 +8,7 @@
*
* Implement the user Interface module.
*
* Version: @(#)win_ui.c 1.0.26 2018/10/05
* Version: @(#)win_ui.c 1.0.27 2018/10/07
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -59,11 +59,6 @@
#include "resource.h"
#ifndef GWL_WNDPROC
# define GWL_WNDPROC GWLP_WNDPROC
#endif
#define TIMER_1SEC 1 /* ID of the one-second timer */
#define ICONS_MAX 256 /* number of icons we can cache */
@@ -194,7 +189,7 @@ StatusBarCreate(uintptr_t id)
/* Replace the original procedure with ours. */
stbar_orig_proc = GetWindowLongPtr(hwndSBAR, GWLP_WNDPROC);
SetWindowLongPtr(hwndSBAR, GWL_WNDPROC, (LONG_PTR)sb_dlg_proc);
SetWindowLongPtr(hwndSBAR, GWLP_WNDPROC, (LONG_PTR)sb_dlg_proc);
SendMessage(hwndSBAR, SB_SETMINHEIGHT, (WPARAM)SB_HEIGHT, (LPARAM)0);
@@ -563,14 +558,14 @@ plat_set_input(HWND h)
{
/* If needed, rest the old one first. */
if (input_orig_hwnd != NULL) {
SetWindowLongPtr(input_orig_hwnd, GWL_WNDPROC,
SetWindowLongPtr(input_orig_hwnd, GWLP_WNDPROC,
(LONG_PTR)input_orig_proc);
}
/* Redirect the window procedure so we can catch WM_INPUT. */
input_orig_proc = GetWindowLongPtr(h, GWLP_WNDPROC);
input_orig_hwnd = h;
SetWindowLongPtr(h, GWL_WNDPROC, (LONG_PTR)input_proc);
SetWindowLongPtr(h, GWLP_WNDPROC, (LONG_PTR)input_proc);
}