Hopefully final update to Logitech Bus Mouse - now works on DOS(MS 2.0/9.1), Win3, WfW311, Win95, Win98, NT 3.1, NT 3.51.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Platform main support module for Windows.
|
||||
*
|
||||
* Version: @(#)win.c 1.0.36 2017/11/18
|
||||
* Version: @(#)win.c 1.0.37 2017/11/20
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
#define UNICODE
|
||||
#include <windows.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@@ -158,7 +159,6 @@ plat_get_string(int i)
|
||||
|
||||
|
||||
#ifndef USE_WX
|
||||
# ifdef USE_CONSOLE
|
||||
/* Create a console if we don't already have one. */
|
||||
static void
|
||||
CreateConsole(int init)
|
||||
@@ -205,7 +205,6 @@ CreateConsole(int init)
|
||||
*stdin = *fp;
|
||||
#endif
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
/* Process the commandline, and create standard argc/argv array. */
|
||||
@@ -277,7 +276,7 @@ ProcessCommandLine(wchar_t ***argw)
|
||||
* For the Windows platform, this is the start of the application.
|
||||
*/
|
||||
int WINAPI
|
||||
WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nFunsterStil)
|
||||
WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nCmdShow)
|
||||
{
|
||||
wchar_t **argw = NULL;
|
||||
int argc, i;
|
||||
@@ -296,29 +295,27 @@ WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszArg, int nFunsterStil)
|
||||
/* First, set our (default) language. */
|
||||
set_language(0x0409);
|
||||
|
||||
#ifdef USE_CONSOLE
|
||||
/* Create console window. */
|
||||
CreateConsole(1);
|
||||
#endif
|
||||
|
||||
/* Process the command line for options. */
|
||||
argc = ProcessCommandLine(&argw);
|
||||
|
||||
/* Pre-initialize the system, this loads the config file. */
|
||||
if (! pc_init(argc, argw)) {
|
||||
#ifdef USE_CONSOLE
|
||||
/* Detach from console. */
|
||||
CreateConsole(0);
|
||||
#endif
|
||||
return(1);
|
||||
}
|
||||
|
||||
/* Cleanup: we no longer need the commandline arguments. */
|
||||
if (! force_debug)
|
||||
CreateConsole(0);
|
||||
free(argw[0]);
|
||||
free(argw);
|
||||
|
||||
/* Handle our GUI. */
|
||||
i = ui_init(nFunsterStil);
|
||||
i = ui_init(nCmdShow);
|
||||
|
||||
return(i);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Platform support defintions for Win32.
|
||||
*
|
||||
* Version: @(#)win.h 1.0.9 2017/11/12
|
||||
* Version: @(#)win.h 1.0.10 2017/11/20
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -99,7 +99,7 @@ extern int hard_disk_was_added(void);
|
||||
|
||||
|
||||
/* Platform UI support functions. */
|
||||
extern int ui_init(int nStyle);
|
||||
extern int ui_init(int nCmdShow);
|
||||
|
||||
|
||||
/* Functions in win_about.c: */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* user Interface module for WinAPI on Windows.
|
||||
*
|
||||
* Version: @(#)win_ui.c 1.0.3 2017/11/19
|
||||
* Version: @(#)win_ui.c 1.0.4 2017/11/20
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -642,7 +642,7 @@ SubWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
|
||||
int
|
||||
ui_init(int nFunsterStil)
|
||||
ui_init(int nCmdShow)
|
||||
{
|
||||
WCHAR title[200];
|
||||
WNDCLASSEX wincl; /* buffer for main window's class */
|
||||
@@ -709,7 +709,7 @@ ui_init(int nFunsterStil)
|
||||
ResetAllMenus();
|
||||
|
||||
/* Make the window visible on the screen. */
|
||||
ShowWindow(hwnd, nFunsterStil);
|
||||
ShowWindow(hwnd, nCmdShow);
|
||||
|
||||
/* Load the accelerator table */
|
||||
haccel = LoadAccelerators(hinstance, ACCEL_NAME);
|
||||
|
||||
Reference in New Issue
Block a user