Removed USE_NETWORK selectivity.

This commit is contained in:
waltje
2017-10-01 16:56:15 -04:00
parent 2dbf5409c0
commit a01eb7ef34
6 changed files with 17 additions and 128 deletions

View File

@@ -8,7 +8,7 @@
*
* The Emulator's Windows core.
*
* Version: @(#)win.c 1.0.13 2017/09/30
* Version: @(#)win.c 1.0.14 2017/10/01
*
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
* Miran Grca, <mgrca8@gmail.com>
@@ -50,9 +50,7 @@
#include "../hdd/hdc_ide.h"
#include "../scsi/scsi.h"
#include "../scsi/scsi_disk.h"
#ifdef USE_NETWORK
# include "../network/network.h"
#endif
#include "../network/network.h"
#include "../video/video.h"
#include "../video/vid_ega.h"
#include "../sound/sound.h"
@@ -943,7 +941,6 @@ void create_hd_tip(int part)
wcscpy(sbTips[part], tempTip);
}
#ifdef USE_NETWORK
void create_network_tip(int part)
{
WCHAR tempTip[512];
@@ -957,7 +954,6 @@ void create_network_tip(int part)
sbTips[part] = (WCHAR *) malloc((wcslen(tempTip) << 1) + 2);
wcscpy(sbTips[part], tempTip);
}
#endif
void update_tip(int meaning)
{
@@ -1087,7 +1083,6 @@ void destroy_tips(void)
sbTips = NULL;
}
#ifdef USE_NETWORK
int display_network_icon(void)
{
if (network_card == 0)
@@ -1106,7 +1101,6 @@ int display_network_icon(void)
}
}
}
#endif
void update_status_bar_panes(HWND hwnds)
{
@@ -1119,9 +1113,7 @@ void update_status_bar_panes(HWND hwnds)
int c_ide_pio = 0;
int c_ide_dma = 0;
int c_scsi = 0;
#ifdef USE_NETWORK
int do_net = 0;
#endif
sb_ready = 0;
@@ -1132,9 +1124,7 @@ void update_status_bar_panes(HWND hwnds)
c_ide_pio = hdd_count(HDD_BUS_IDE_PIO_ONLY);
c_ide_dma = hdd_count(HDD_BUS_IDE_PIO_AND_DMA);
c_scsi = hdd_count(HDD_BUS_SCSI);
#ifdef USE_NETWORK
do_net = display_network_icon();
#endif
if (sb_parts > 0)
{
@@ -1237,12 +1227,10 @@ void update_status_bar_panes(HWND hwnds)
{
sb_parts++;
}
#ifdef USE_NETWORK
if (do_net)
{
sb_parts++;
}
#endif
sb_parts++;
iStatusWidths = (int *) malloc(sb_parts * sizeof(int));
@@ -1350,7 +1338,6 @@ void update_status_bar_panes(HWND hwnds)
sb_part_meanings[sb_parts] = SB_HDD | HDD_BUS_SCSI;
sb_parts++;
}
#ifdef USE_NETWORK
if (do_net)
{
edge += SB_ICON_WIDTH;
@@ -1358,7 +1345,6 @@ void update_status_bar_panes(HWND hwnds)
sb_part_meanings[sb_parts] = SB_NETWORK;
sb_parts++;
}
#endif
if (sb_parts)
{
iStatusWidths[sb_parts - 1] += (24 - SB_ICON_WIDTH);
@@ -1419,13 +1405,11 @@ void update_status_bar_panes(HWND hwnds)
sb_part_icons[i] = 192;
create_hd_tip(i);
break;
#ifdef USE_NETWORK
case SB_NETWORK:
/* Hard disk */
sb_part_icons[i] = 208;
create_network_tip(i);
break;
#endif
case SB_TEXT:
/* Status text */
SendMessage(hwnds, SB_SETTEXT, i | SBT_NOBORDERS, (LPARAM) L"");
@@ -1480,12 +1464,10 @@ HWND EmulatorStatusBar(HWND hwndParent, int idStatus, HINSTANCE hinst)
hIcon[i] = LoadIconEx((PCTSTR) i);
}
#ifdef USE_NETWORK
for (i = 208; i < 210; i++)
{
hIcon[i] = LoadIconEx((PCTSTR) i);
}
#endif
for (i = 384; i < 386; i++)
{
@@ -1564,12 +1546,10 @@ void reset_menus(void)
# ifdef ENABLE_SERIAL_LOG
CheckMenuItem(menu, IDM_LOG_SERIAL, MF_UNCHECKED);
# endif
#ifdef USE_NETWORK
# ifdef ENABLE_NIC_LOG
/*FIXME: should be network_setlog(1:0) */
CheckMenuItem(menu, IDM_LOG_NIC, MF_UNCHECKED);
# endif
#endif
#endif
CheckMenuItem(menu, IDM_VID_FORCE43, MF_UNCHECKED);
@@ -1618,12 +1598,10 @@ void reset_menus(void)
# ifdef ENABLE_SERIAL_LOG
CheckMenuItem(menu, IDM_LOG_SERIAL, serial_do_log ? MF_CHECKED : MF_UNCHECKED);
# endif
#ifdef USE_NETWORK
# ifdef ENABLE_NIC_LOG
/*FIXME: should be network_setlog(1:0) */
CheckMenuItem(menu, IDM_LOG_NIC, nic_do_log ? MF_CHECKED : MF_UNCHECKED);
# endif
#endif
#endif
CheckMenuItem(menu, IDM_VID_FORCE43, force_43 ? MF_CHECKED : MF_UNCHECKED);
@@ -1745,9 +1723,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpsz
init_cdrom_host_drives();
#ifdef USE_NETWORK
network_init();
#endif
hwndStatus = EmulatorStatusBar(hwnd, IDC_STATUS, hThisInstance);
@@ -2291,7 +2267,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
break;
#endif
#ifdef USE_NETWORK
#ifdef ENABLE_NIC_LOG
case IDM_LOG_NIC:
/*FIXME: should be network_setlog() */
@@ -2300,7 +2275,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
break;
#endif
#endif
#endif
#ifdef ENABLE_LOG_BREAKPOINT
case IDM_LOG_BREAKPOINT:
@@ -2372,9 +2346,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
/* pclog_w(L"NVR path: %s\n", nvr_path); */
mem_resize();
rom_load_bios(romset);
#ifdef USE_NETWORK
network_init();
#endif
reset_menus();
update_status_bar_panes(hwndStatus);
resetpchard_init();