Applied the recent mainline PCem commits (and fixed the Pentium machines);
Ported the Roland MT-32 emulation (using MUNT) from bit's MT32 emulation branch of PCem; Sanitized the OpenAL give buffer code in openal.c a bit; NVR path is now specifiable in the Settings dialog; Added Logitech 3-button serial mouse per protocol description by waltje; The RTL8029AS and the BT-958D now actually use the PCI IRQ routing; Fixed BT-958D PCI device initialization on the bus; PCI IRQ routing now respects the edge/level setting set on ports 4D0/4D1.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Windows device configuration dialog implementation.
|
||||
*
|
||||
* Version: @(#)win_deviceconfig.c 1.0.0 2017/05/30
|
||||
* Version: @(#)win_deviceconfig.c 1.0.1 2017/06/19
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -18,8 +18,10 @@
|
||||
#include "../ibm.h"
|
||||
#include "../config.h"
|
||||
#include "../device.h"
|
||||
#include "plat_midi.h"
|
||||
#define NO_UNICODE /*FIXME: not Unicode? */
|
||||
#include "win.h"
|
||||
#include "win_language.h"
|
||||
#include <windowsx.h>
|
||||
|
||||
|
||||
@@ -29,15 +31,22 @@ static device_t *config_device;
|
||||
static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND h;
|
||||
|
||||
int val_int;
|
||||
int ret;
|
||||
int id;
|
||||
device_config_t *config;
|
||||
int c;
|
||||
int num;
|
||||
int changed;
|
||||
char s[80];
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
int id = IDC_CONFIG_BASE;
|
||||
device_config_t *config = config_device->config;
|
||||
int c;
|
||||
id = IDC_CONFIG_BASE;
|
||||
config = config_device->config;
|
||||
|
||||
while (config->type != -1)
|
||||
{
|
||||
@@ -70,6 +79,21 @@ static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_MIDI:
|
||||
val_int = config_get_int(config_device->name, config->name, config->default_int);
|
||||
|
||||
num = plat_midi_get_num_devs();
|
||||
for (c = 0; c < num; c++)
|
||||
{
|
||||
plat_midi_get_dev_name(c, s);
|
||||
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)s);
|
||||
if (val_int == c)
|
||||
SendMessage(h, CB_SETCURSEL, c, 0);
|
||||
}
|
||||
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_HEX16:
|
||||
val_int = config_get_hex16(config_device->name, config->name, config->default_int);
|
||||
|
||||
@@ -112,10 +136,9 @@ static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam
|
||||
{
|
||||
case IDOK:
|
||||
{
|
||||
int id = IDC_CONFIG_BASE;
|
||||
device_config_t *config = config_device->config;
|
||||
int c;
|
||||
int changed = 0;
|
||||
id = IDC_CONFIG_BASE;
|
||||
config = config_device->config;
|
||||
changed = 0;
|
||||
|
||||
while (config->type != -1)
|
||||
{
|
||||
@@ -147,6 +170,17 @@ static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_MIDI:
|
||||
val_int = config_get_int(config_device->name, config->name, config->default_int);
|
||||
|
||||
c = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
|
||||
if (val_int != c)
|
||||
changed = 1;
|
||||
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_HEX16:
|
||||
val_int = config_get_hex16(config_device->name, config->name, config->default_int);
|
||||
|
||||
@@ -183,11 +217,17 @@ static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam
|
||||
EndDialog(hdlg, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (MessageBox(NULL, "This will reset 86Box!\nOkay to continue?", "86Box", MB_OKCANCEL) != IDOK)
|
||||
{
|
||||
EndDialog(hdlg, 0);
|
||||
return TRUE;
|
||||
|
||||
ret = msgbox_reset(ghwnd);
|
||||
switch(ret)
|
||||
{
|
||||
case IDNO:
|
||||
EndDialog(hdlg, 0);
|
||||
return TRUE;
|
||||
case IDCANCEL:
|
||||
return FALSE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
id = IDC_CONFIG_BASE;
|
||||
@@ -215,6 +255,13 @@ static BOOL CALLBACK deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_MIDI:
|
||||
c = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
config_set_int(config_device->name, config->name, c);
|
||||
|
||||
id += 2;
|
||||
break;
|
||||
|
||||
case CONFIG_HEX16:
|
||||
c = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||
for (; c > 0; c--)
|
||||
@@ -308,6 +355,7 @@ void deviceconfig_open(HWND hwnd, device_t *device)
|
||||
break;
|
||||
|
||||
case CONFIG_SELECTION:
|
||||
case CONFIG_MIDI:
|
||||
case CONFIG_HEX16:
|
||||
case CONFIG_HEX20:
|
||||
/*Combo box*/
|
||||
|
||||
Reference in New Issue
Block a user