Applied a whole slew of patches, getting RAM usage down by a further 10 MB.

This commit is contained in:
OBattler
2018-03-19 01:02:04 +01:00
parent b6c393cc91
commit b1efb99ed6
222 changed files with 9538 additions and 9980 deletions

View File

@@ -8,7 +8,7 @@
*
* Platform support defintions for Win32.
*
* Version: @(#)win.h 1.0.14 2018/01/21
* Version: @(#)win.h 1.0.15 2018/03/18
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -94,7 +94,7 @@ extern void win_mouse_close(void);
extern intptr_t fdd_type_to_icon(int type);
#ifdef EMU_DEVICE_H
extern uint8_t deviceconfig_open(HWND hwnd, device_t *device);
extern uint8_t deviceconfig_open(HWND hwnd, const device_t *device);
#endif
extern uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type);

View File

@@ -8,7 +8,7 @@
*
* Windows device configuration dialog implementation.
*
* Version: @(#)win_devconf.c 1.0.15 2018/02/25
* Version: @(#)win_devconf.c 1.0.16 2018/03/18
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -30,7 +30,7 @@
#include <windowsx.h>
static device_t *config_device;
static const device_t *config_device;
static uint8_t deviceconfig_changed = 0;
@@ -47,10 +47,10 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
int val_int;
int id;
int c;
int num;
int num;
int changed;
int cid;
device_config_t *config;
int cid;
const device_config_t *config;
char s[80];
wchar_t ws[512];
LPTSTR lptsTemp;
@@ -66,7 +66,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
while (config->type != -1)
{
device_config_selection_t *selection = config->selection;
const device_config_selection_t *selection = config->selection;
h = GetDlgItem(hdlg, id);
switch (config->type)
@@ -183,7 +183,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
while (config->type != -1)
{
device_config_selection_t *selection = config->selection;
const device_config_selection_t *selection = config->selection;
h = GetDlgItem(hdlg, id);
switch (config->type)
@@ -295,7 +295,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
while (config->type != -1)
{
device_config_selection_t *selection = config->selection;
const device_config_selection_t *selection = config->selection;
h = GetDlgItem(hdlg, id);
switch (config->type)
@@ -375,7 +375,7 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
else
{
int id = IDC_CONFIG_BASE;
device_config_t *config = config_device->config;
const device_config_t *config = config_device->config;
while (config->type != -1)
{
@@ -455,9 +455,9 @@ deviceconfig_dlgproc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
return FALSE;
}
uint8_t deviceconfig_open(HWND hwnd, device_t *device)
uint8_t deviceconfig_open(HWND hwnd, const device_t *device)
{
device_config_t *config = device->config;
const device_config_t *config = device->config;
uint16_t *data_block = malloc(16384);
uint16_t *data;
DLGTEMPLATE *dlg = (DLGTEMPLATE *)data_block;

View File

@@ -8,13 +8,13 @@
*
* Joystick interface to host device.
*
* Version: @(#)win_joystick.cpp 1.0.7 2017/12/15
* Version: @(#)win_joystick.cpp 1.0.8 2018/03/18
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
*
* Copyright 2008-2017 Sarah Walker.
* Copyright 2016,2017 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2016-2018 Miran Grca.
*/
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
@@ -25,7 +25,6 @@
#include "../device.h"
#include "../plat.h"
#include "../game/gameport.h"
#include "../plat_joystick.h"
#include "win.h"

View File

@@ -12,7 +12,6 @@
#include "../device.h"
#include "../game/gameport.h"
#include "../plat.h"
#include "../plat_joystick.h"
#include "win.h"

View File

@@ -8,7 +8,7 @@
*
* Windows 86Box Settings dialog handler.
*
* Version: @(#)win_settings.c 1.0.43 2018/03/10
* Version: @(#)win_settings.c 1.0.44 2018/03/18
*
* Author: Miran Grca, <mgrca8@gmail.com>
*
@@ -173,7 +173,7 @@ static void win_settings_init(void)
/* Network category */
temp_net_type = network_type;
memset(temp_pcap_dev, 0, sizeof(temp_pcap_dev));
strcpy(temp_pcap_dev, network_pcap);
strcpy(temp_pcap_dev, network_host);
temp_net_card = network_card;
/* Ports category */
@@ -289,7 +289,7 @@ static int win_settings_changed(void)
/* Network category */
i = i || (network_type != temp_net_type);
i = i || strcmp(temp_pcap_dev, network_pcap);
i = i || strcmp(temp_pcap_dev, network_host);
i = i || (network_card != temp_net_card);
/* Ports category */
@@ -392,8 +392,8 @@ static void win_settings_save(void)
/* Network category */
network_type = temp_net_type;
memset(network_pcap, '\0', sizeof(network_pcap));
strcpy(network_pcap, temp_pcap_dev);
memset(network_host, '\0', sizeof(network_host));
strcpy(network_host, temp_pcap_dev);
network_card = temp_net_card;
/* Ports category */
@@ -436,28 +436,7 @@ static void win_settings_save(void)
/* Mark configuration as changed. */
config_changed = 1;
#if 1
pc_reset_hard_init();
#else
mem_resize();
rom_load_bios(romset);
ui_sb_update_panes();
sound_realloc_buffers();
pc_reset_hard_init();
cpu_set();
cpu_update_waitstates();
config_save();
pc_speed_changed();
if (joystick_type != 7) gameport_update_joystick_type();
#endif
}
@@ -980,7 +959,7 @@ win_settings_video_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
static int mouse_valid(int num, int m)
{
device_t *dev;
const device_t *dev;
if ((num == MOUSE_TYPE_INTERNAL) &&
!(machines[m].flags & MACHINE_MOUSE)) return(0);
@@ -1184,7 +1163,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
int c = 0;
int d = 0;
LPTSTR lptsTemp;
device_t *sound_dev/*, *midi_dev*/;
const device_t *sound_dev;
char *s;
switch (message)
@@ -1256,8 +1235,6 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
if (midi_device_available(c))
{
/* midi_dev = midi_device_getdevice(c); */
if (c == 0)
{
SendMessage(h, CB_ADDSTRING, 0, (LPARAM)plat_get_string(IDS_2152));
@@ -1606,7 +1583,7 @@ win_settings_peripherals_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lPa
int c = 0;
int d = 0;
LPTSTR lptsTemp;
device_t *scsi_dev;
const device_t *scsi_dev;
switch (message)
{