More fixed and updates. No new code or features.

This commit is contained in:
waltje
2018-06-08 19:43:22 -04:00
parent 2b1c583e57
commit 1a3148e9c7
18 changed files with 267 additions and 128 deletions

View File

@@ -12,7 +12,7 @@
* it on Windows XP, and possibly also Vista. Use the
* -DANSI_CFG for use on these systems.
*
* Version: @(#)config.c 1.0.28 2018/05/24
* Version: @(#)config.c 1.0.29 2018/06/06
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -1082,15 +1082,15 @@ static void
save_disks(const char *cat)
{
char temp[24], tmp2[64];
char *p;
const char *str;
int c;
for (c = 0; c < HDD_NUM; c++) {
sprintf(temp, "hdd_%02i_parameters", c+1);
if (hdd_is_valid(c)) {
p = hdd_bus_to_string(hdd[c].bus, 0);
str = hdd_bus_to_string(hdd[c].bus, 0);
sprintf(tmp2, "%u, %u, %u, %d, %s",
hdd[c].spt, hdd[c].hpc, hdd[c].tracks, hdd[c].wp, p);
hdd[c].spt, hdd[c].hpc, hdd[c].tracks, hdd[c].wp, str);
config_set_string(cat, temp, tmp2);
} else {
config_delete_var(cat, temp);

View File

@@ -8,7 +8,7 @@
*
* Driver for the ESDI controller (WD1007-vse1) for PC/AT.
*
* Version: @(#)hdc_esdi_at.c 1.0.10 2018/05/06
* Version: @(#)hdc_esdi_at.c 1.0.11 2018/06/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -235,7 +235,10 @@ hdc_writew(uint16_t port, uint16_t val, void *priv)
dev->pos = 0;
dev->status = STAT_BUSY;
timer_clock();
dev->callback = 6LL*HDC_TIME;
/* 390.625 us per sector at 10 Mbit/s = 1280 kB/s. */
dev->callback = (3125LL * TIMER_USEC) / 8LL;
timer_update_outstanding();
}
}
@@ -412,6 +415,10 @@ hdc_write(uint16_t port, uint8_t val, void *priv)
dev->status = STAT_BUSY;
}
dev->fdisk = val;
/* Lower IRQ on IRQ disable. */
if ((val & 2) && !(dev->fdisk & 0x02))
picintc(1 << 14);
break;
}
}
@@ -435,7 +442,10 @@ hdc_readw(uint16_t port, void *priv)
next_sector(dev);
dev->status = STAT_BUSY;
timer_clock();
dev->callback = 6LL*HDC_TIME;
/* 390.625 us per sector at 10 Mbit/s = 1280 kB/s. */
dev->callback = (3125LL * TIMER_USEC) / 8LL;
timer_update_outstanding();
} else {
ui_sb_icon_update(SB_HDD|HDD_BUS_ESDI, 0);

View File

@@ -12,7 +12,7 @@
* based design. Most cards were WD1003-WA2 or -WAH, where the
* -WA2 cards had a floppy controller as well (to save space.)
*
* Version: @(#)hdc_st506_at.c 1.0.8 2018/05/06
* Version: @(#)hdc_st506_at.c 1.0.9 2018/06/08
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
@@ -131,17 +131,21 @@ typedef struct {
static __inline void
irq_raise(hdc_t *dev)
{
#if 0
/* If not already pending.. */
if (! dev->irqstat) {
#endif
/* If enabled in the control register.. */
if (! (dev->fdisk&0x02)) {
if (! (dev->fdisk & 0x02)) {
/* .. raise IRQ14. */
picint(1<<14);
}
/* Remember this. */
dev->irqstat = 1;
#if 0
}
#endif
}
@@ -151,7 +155,7 @@ irq_lower(hdc_t *dev)
/* If raised.. */
if (dev->irqstat) {
/* If enabled in the control register.. */
if (! (dev->fdisk&0x02)) {
if (! (dev->fdisk & 0x02)) {
/* .. drop IRQ14. */
picintc(1<<14);
}
@@ -411,7 +415,10 @@ hdc_writew(uint16_t port, uint16_t val, void *priv)
dev->pos = 0;
dev->status = STAT_BUSY;
timer_clock();
dev->callback = 6LL*ST506_TIME;
/* 781.25 us per sector at 5 Mbit/s = 640 kB/s. */
dev->callback = ((3125LL * TIMER_USEC) / 4LL);
timer_update_outstanding();
}
}
@@ -481,6 +488,10 @@ hdc_write(uint16_t port, uint8_t val, void *priv)
timer_update_outstanding();
}
dev->fdisk = val;
/* Lower IRQ on IRQ disable. */
if ((val & 2) && !(dev->fdisk & 0x02))
picintc(1 << 14);
break;
}
}
@@ -503,7 +514,10 @@ hdc_readw(uint16_t port, void *priv)
next_sector(dev);
dev->status = STAT_BUSY;
timer_clock();
dev->callback = 6LL*ST506_TIME;
/* 781.25 us per sector at 5 Mbit/s = 640 kB/s. */
dev->callback = ((3125LL * TIMER_USEC) / 4LL);
timer_update_outstanding();
} else {
ui_sb_icon_update(SB_HDD|HDD_BUS_ST506, 0);

View File

@@ -8,7 +8,7 @@
*
* Common code to handle all sorts of hard disk images.
*
* Version: @(#)hdd.c 1.0.7 2018/05/24
* Version: @(#)hdd.c 1.0.8 2018/06/06
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -83,7 +83,7 @@ hdd_count(int bus)
int c = 0;
int i;
for (i=0; i<HDD_NUM; i++) {
for (i = 0; i < HDD_NUM; i++) {
if (hdd[i].bus == bus)
c++;
}
@@ -93,7 +93,7 @@ hdd_count(int bus)
int
hdd_string_to_bus(char *str, int cdrom)
hdd_string_to_bus(const char *str, int cdrom)
{
if (! strcmp(str, "none"))
return(HDD_BUS_DISABLED);
@@ -160,10 +160,10 @@ no_cdrom:
}
char *
const char *
hdd_bus_to_string(int bus, int cdrom)
{
char *s = "none";
const char *s = "none";
switch (bus) {
case HDD_BUS_DISABLED:

View File

@@ -8,7 +8,7 @@
*
* Definitions for the hard disk image handler.
*
* Version: @(#)hdd.h 1.0.8 2018/04/28
* Version: @(#)hdd.h 1.0.9 2018/06/06
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -110,8 +110,8 @@ extern int hdd_do_log;
extern void hdd_log(const char *fmt, ...);
extern int hdd_init(void);
extern int hdd_count(int bus);
extern int hdd_string_to_bus(char *str, int cdrom);
extern char *hdd_bus_to_string(int bus, int cdrom);
extern int hdd_string_to_bus(const char *str, int cdrom);
extern const char *hdd_bus_to_string(int bus, int cdrom);
extern int hdd_is_valid(int c);
extern int hdd_image_load(int id);

View File

@@ -8,7 +8,7 @@
*
* Definitions for the mouse driver.
*
* Version: @(#)mouse.h 1.0.5 2018/04/19
* Version: @(#)mouse.h 1.0.6 2018/06/06
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -80,6 +80,7 @@ extern const device_t *mouse_get_device(int mouse);
extern void *mouse_ps2_init(const device_t *);
extern const device_t mouse_logibus_device;
extern const device_t mouse_logibus_internal_device;
extern const device_t mouse_msinport_device;
#if 0
extern const device_t mouse_genibus_device;

View File

@@ -49,7 +49,7 @@
*
* Based on an early driver for MINIX 1.5.
*
* Version: @(#)mouse_bus.c 1.0.7 2018/05/06
* Version: @(#)mouse_bus.c 1.0.8 2018/06/06
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -101,6 +101,7 @@
#define MOUSE_PORT 0x023c /* default */
#define MOUSE_IRQ 5 /* default */
#define MOUSE_IRQ_INTERNAL 2 /* IRQ for internal mice */
#define MOUSE_BUTTONS 2 /* default */
#define MOUSE_DEBUG 0
@@ -709,10 +710,15 @@ bm_init(const device_t *info)
memset(dev, 0x00, sizeof(mouse_t));
dev->name = info->name;
dev->type = info->local;
if (info->config != NULL) {
dev->irq = device_get_config_int("irq");
i = device_get_config_int("buttons");
if (i > 2)
dev->flags |= FLAG_3BTN;
} else {
dev->irq = MOUSE_IRQ_INTERNAL; /*hardwired*/
i = 2;
}
pclog("MOUSE: %s (I/O=%04x, IRQ=%d, buttons=%d)\n",
dev->name, MOUSE_PORT, dev->irq, i);
@@ -802,6 +808,15 @@ const device_t mouse_logibus_device = {
bm_config
};
const device_t mouse_logibus_internal_device = {
"Logitech Bus Mouse (Internal)",
DEVICE_ISA,
MOUSE_LOGIBUS,
bm_init, bm_close, NULL,
bm_poll, NULL, NULL, NULL,
NULL
};
const device_t mouse_msinport_device = {
"Microsoft Bus Mouse (InPort)",
DEVICE_ISA,

View File

@@ -189,7 +189,7 @@
* including the later update (DS12887A) which implemented a
* "century" register to be compatible with Y2K.
*
* Version: @(#)nvr_at.c 1.0.8 2018/05/06
* Version: @(#)nvr_at.c 1.0.9 2018/06/07
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -488,15 +488,18 @@ timer_tick(nvr_t *nvr)
local_t *local = (local_t *)nvr->data;
/* Only update it there is no SET in progress. */
if (! (nvr->regs[RTC_REGB] & REGB_SET)) {
if (nvr->regs[RTC_REGB] & REGB_SET) return;
/* Set the UIP bit, announcing the update. */
local->stat = REGA_UIP;
#if 0
/* Not sure if this is needed here. */
timer_recalc(nvr, 0);
#endif
/* Schedule the actual update. */
local->ecount = (int64_t)((244.0 + 1984.0) * TIMER_USEC);
}
}

View File

@@ -66,7 +66,7 @@
* bit 1: b8000 memory available
* 0000:046a: 00 jim 250 01 jim 350
*
* Version: @(#)m_europc.c 1.0.14 2018/05/12
* Version: @(#)m_europc.c 1.0.15 2018/06/06
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -264,11 +264,6 @@ rtc_start(nvr_t *nvr)
rtc_time_get(nvr->regs, &tm);
nvr_time_set(&tm);
}
#if 0
/* Start the RTC - BIOS will do this. */
nvr->regs[MRTC_CTRLSTAT] = 0x01;
#endif
}
@@ -281,7 +276,7 @@ rtc_checksum(uint8_t *ptr)
/* Calculate all bytes with XOR. */
sum = 0x00;
for (i=MRTC_CONF_A; i<=MRTC_CONF_E; i++)
for (i = MRTC_CONF_A; i <= MRTC_CONF_E; i++)
sum += ptr[i];
return(sum);
@@ -620,7 +615,11 @@ europc_boot(const device_t *info)
/* Set up game port. */
b = (sys->nvr.regs[MRTC_CONF_C] & 0xfc);
if (mouse_type == MOUSE_INTERNAL) {
b |= 0x01; /* enable port as MOUSE */
/* Enable the Logitech Bus Mouse device. */
device_add(&mouse_logibus_internal_device);
/* Configure the port for (Bus Mouse Compatible) Mouse. */
b |= 0x01;
} else if (game_enabled) {
b |= 0x02; /* enable port as joysticks */
}

BIN
src/ui/lang/VARCem-BY.str Normal file

Binary file not shown.

Binary file not shown.

BIN
src/ui/lang/VARCem-LT.str Normal file

Binary file not shown.

View File

@@ -8,7 +8,7 @@
*
* Common resources for the application.
*
* Version: @(#)VARCem-common.rc 1.0.5 2018/06/02
* Version: @(#)VARCem-common.rc 1.0.6 2018/06/06
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -197,9 +197,9 @@ BEGIN
LTEXT STR_3201,IDC_ABOUT_ICON,5,55,40,10
LTEXT STR_3202,IDC_ABOUT_ICON,50,55,195,30
LTEXT STR_3203,IDC_ABOUT_ICON,5,85,240,20
LTEXT STR_3203,IDC_ABOUT_ICON,5,85,240,30
LTEXT STR_3204,IDC_ABOUT_ICON,5,110,240,10
LTEXT STR_3204,IDC_ABOUT_ICON,5,115,240,10
PUSHBUTTON STR_LOCALIZE,IDC_LOCALIZE,5,140,60,14

View File

@@ -173,8 +173,9 @@ static BOOL CALLBACK
#endif
dlg_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
{
static HBRUSH brush = NULL;
wchar_t temp[128];
static HBITMAP hBmp;
HBITMAP hBmp;
HWND h;
switch (message) {
@@ -239,17 +240,18 @@ static HBITMAP hBmp;
case WM_CTLCOLORSTATIC:
if ((HWND)lParam == GetDlgItem(hdlg, IDC_DONATE)) {
/* Grab background color from dialog window. */
HDC hDC = GetDC(hdlg);
COLORREF col = GetBkColor(hDC);
/* Set as background color for static controli.. */
hDC = (HDC)wParam;
SetBkColor(hDC, col);
#if 1
return (LRESULT)CreateSolidBrush(col);
#else
return (LRESULT)CreateSolidBrush(RGB(0,255,0));
#endif
/* .. and also return that as paint color. */
if (brush == NULL)
brush = CreateSolidBrush(col);
return (LRESULT)brush;
}
return FALSE;
}

View File

@@ -125,6 +125,92 @@ static const dllimp_t png_imports[] = {
#endif
static const char *
GetError(HRESULT hr)
{
const char *err = "Unknown";
switch(hr) {
case DDERR_INCOMPATIBLEPRIMARY:
err = "Incompatible Primary";
break;
case DDERR_INVALIDCAPS:
err = "Invalid Caps";
break;
case DDERR_INVALIDOBJECT:
err = "Invalid Object";
break;
case DDERR_INVALIDPARAMS:
err = "Invalid Parameters";
break;
case DDERR_INVALIDPIXELFORMAT:
err = "Invalid Pixel Format";
break;
case DDERR_NOALPHAHW:
err = "Hardware does not support Alpha";
break;
case DDERR_NOCOOPERATIVELEVELSET:
err = "No cooperative level set";
break;
case DDERR_NODIRECTDRAWHW:
err = "Hardware does not support DirectDraw";
break;
case DDERR_NOEMULATION:
err = "No emulation";
break;
case DDERR_NOEXCLUSIVEMODE:
err = "No exclusive mode available";
break;
case DDERR_NOFLIPHW:
err = "Hardware does not support flipping";
break;
case DDERR_NOMIPMAPHW:
err = "Hardware does not support MipMap";
break;
case DDERR_NOOVERLAYHW:
err = "Hardware does not support overlays";
break;
case DDERR_NOZBUFFERHW:
err = "Hardware does not support Z buffers";
break;
case DDERR_OUTOFMEMORY:
err = "Out of memory";
break;
case DDERR_OUTOFVIDEOMEMORY:
err = "Out of video memory";
break;
case DDERR_PRIMARYSURFACEALREADYEXISTS:
err = "Primary Surface already exists";
break;
case DDERR_UNSUPPORTEDMODE:
err = "Mode not supported";
break;
default:
break;
}
return(err);
}
static HBITMAP
CopySurface(IDirectDrawSurface4 *pDDSurface)
{
@@ -181,17 +267,17 @@ bgra_to_rgb(png_bytep *b_rgb, uint8_t *bgra, int width, int height)
/* Not strictly needed, but hey.. */
static void
png_error_handler(UNUSED(png_structp arg), const char *str)
png_error_handler(png_structp arg, const char *str)
{
pclog("DDraw: PNG error '%s'\n", str);
pclog("DDraw: PNG error '%08lx'\n", str);
}
/* Not strictly needed, but hey.. */
static void
png_warning_handler(UNUSED(png_structp arg), const char *str)
png_warning_handler(png_structp arg, const char *str)
{
pclog("DDraw: PNG warning '%s'\n", str);
pclog("DDraw: PNG warning '%08lx'\n", str);
}
@@ -219,7 +305,7 @@ SavePNG(const wchar_t *fn, HBITMAP hBitmap)
}
/* Initialize PNG stuff. */
png_ptr = PNGFUNC(create_write_struct)(PNG_LIBPNG_VER_STRING, NULL,
png_ptr = PNGFUNC(create_write_struct)(PNG_LIBPNG_VER_STRING, (char *)1234,
png_error_handler, png_warning_handler);
if (png_ptr == NULL) {
(void)fclose(fp);
@@ -645,7 +731,7 @@ ddraw_blit(int x, int y, int y1, int y2, int w, int h)
static void
ddraw_close(void)
{
pclog("DDRAW: close (fs=%d)\n", (lpdds_back2 != NULL)?1:0);
pclog("DDRAW: close\n");
video_setblit(NULL);
@@ -745,21 +831,42 @@ ddraw_init(int fs)
{
DDSURFACEDESC2 ddsd;
LPDIRECTDRAW lpdd;
HWND h = hwndRender;
HRESULT hr;
DWORD dw;
HWND h;
pclog("DDraw: initializing (fs=%d)\n", fs);
cgapal_rebuild();
if (FAILED(DirectDrawCreate(NULL, &lpdd, NULL))) return(0);
if (FAILED(lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4)))
hr = DirectDrawCreate(NULL, &lpdd, NULL);
if (FAILED(hr)) {
pclog("DDRAW: cannot create an instance (%s)\n", GetError(hr));
return(0);
}
hr = lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4);
if (FAILED(hr)) {
pclog("DDRAW: no interfaces found (%s)\n", GetError(hr));
return(0);
}
lpdd->Release();
atexit(ddraw_close);
if (FAILED(lpdd4->SetCooperativeLevel(h, DDSCL_NORMAL))) return(0);
if (fs) {
dw = DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | \
DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT;
h = hwndMain;
} else {
dw = DDSCL_NORMAL;
h = hwndRender;
}
hr = lpdd4->SetCooperativeLevel(h, dw);
if (FAILED(hr)) {
pclog("DDRAW: SetCooperativeLevel failed (%s)\n", GetError(hr));
return(0);
}
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
@@ -891,47 +998,6 @@ const vidapi_t ddraw_vidapi = {
#if 0
@@@@@
static int
ddraw_init(int fs)
{
DDSURFACEDESC2 ddsd;
LPDIRECTDRAW lpdd;
HRESULT hr;
HWND h;
DWORD dw;
pclog("DDRAW: init (fs=%d)\n", fs);
cgapal_rebuild();
hr = DirectDrawCreate(NULL, &lpdd, NULL);
if (FAILED(hr)) {
pclog("DDRAW: cannot create an instance (%s)\n", GetError(hr));
return(0);
}
hr = lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4);
if (FAILED(hr)) {
pclog("DDRAW: no interfaces found (%s)\n", GetError(hr));
return(0);
}
lpdd->Release();
lpdd = NULL;
atexit(ddraw_close);
if (fs) {
dw = DDSCL_SETFOCUSWINDOW | DDSCL_CREATEDEVICEWINDOW | \
DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT;
h = hwndMain;
} else {
dw = DDSCL_NORMAL;
h = hwndRender;
}
hr = lpdd4->SetCooperativeLevel(h, dw);
if (FAILED(hr)) {
pclog("DDRAW: SetCooperativeLevel failed (%s)\n", GetError(hr));
return(0);
}
if (fs) {
ddraw_w = GetSystemMetrics(SM_CXSCREEN);

View File

@@ -8,7 +8,7 @@
*
* Handle language support for the platform.
*
* Version: @(#)win_lang.c 1.0.2 2018/05/29
* Version: @(#)win_lang.c 1.0.3 2018/06/04
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
*
@@ -105,25 +105,39 @@ lang_setname(lang_t *ptr)
/* Add a language to the list of supported languages. */
static void
lang_add(lang_t *ptr)
lang_add(lang_t *ptr, int sort)
{
lang_t *p, *pp;
lang_t *prev;
/* Create a copy of the entry data. */
pp = (lang_t *)malloc(sizeof(lang_t));
memcpy(pp, ptr, sizeof(lang_t));
/* Set the name of this language. */
lang_setname(pp);
/* Add this entry to the tail of the list. */
if (languages == NULL) {
if (sort) {
p = languages;
if ((p == NULL) || (wcscmp(pp->name, p->name) < 0)) {
pp->next = p;
languages = pp;
} else {
p = languages;
while (p->next != NULL)
while (p != NULL) {
if (wcscmp(pp->name, p->name) > 0) {
prev = p;
p = p->next;
p->next = pp;
continue;
} else {
prev->next = pp;
pp->next = p;
break;
}
}
prev->next = pp;
}
} else {
/* Just prepend to beginning. */
pp->next = languages;
languages = pp;
}
/* We got one more! */
@@ -149,11 +163,8 @@ lang_scan(void)
DIR *dir;
int l;
/* First, add our native language. */
/* None yet.. */
languages_num = 0;
memset(&lang, 0x00, sizeof(lang));
lang.id = 0x0409;
lang_add(&lang);
/* Open the "language modules" directory. */
swprintf(path, sizeof_w(temp), L"%ls%ls", emu_path, LANGUAGE_PATH);
@@ -242,11 +253,20 @@ lang_scan(void)
wcscpy(ptr, str);
lang.email = (const wchar_t *)ptr;
/* Set the name of this language. */
lang_setname(&lang);
/* Add this language. */
lang_add(&lang);
lang_add(&lang, 1);
}
(void)closedir(dir);
}
/* Add the application's primary language. */
memset(&lang, 0x00, sizeof(lang));
lang.id = 0x0409;
lang_setname(&lang);
lang_add(&lang, 0);
}
@@ -404,6 +424,10 @@ plat_lang_menu(void)
/* Add this language to the Languages menu. */
menu_add_item(IDM_LANGUAGE, i, ptr->name);
/* Add separator after primary language. */
if (ptr == languages)
menu_add_item(IDM_LANGUAGE, i, NULL);
}
/* Set active language. */

View File

@@ -8,7 +8,7 @@
*
* Implementation of the New Floppy/ZIP Image dialog.
*
* Version: @(#)win_new_image.c 1.0.18 2018/05/24
* Version: @(#)win_new_image.c 1.0.19 2018/06/05
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -186,15 +186,20 @@ dlg_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
if (wcslen(temp_path) && (wcslen(temp_path) <= 256)) {
twcs = &temp_path[wcslen(temp_path)];
twcs[0] = L'.';
if (!is_zip && (filterindex == 3)) {
if (is_zip) {
twcs[1] = L'i';
twcs[2] = L'm';
twcs[3] = L'g';
} else if (filterindex == 3) {
twcs[1] = L'8';
twcs[2] = L'6';
twcs[3] = L'f';
} else {
twcs[1] = L'i';
twcs[2] = L'm';
twcs[3] = L'g';
twcs[3] = L'a';
}
twcs[4] = L'\0';
}
}
h = GetDlgItem(hdlg, IDC_EDIT_FILE_NAME);

View File

@@ -309,7 +309,7 @@ disk_recalc_location_controls(HWND hdlg, int is_add_dlg, int assign_id)
if ((hd_listview_items > 0) || is_add_dlg) {
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
bus = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
bus = SendMessage(h, CB_GETCURSEL, 0, 0);
switch(bus) {
case HDD_BUS_ST506: /* ST506 MFM/RLL */
@@ -940,7 +940,7 @@ disk_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
case IDOK:
if (!(existing & 2)) {
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
hdd_ptr->bus = (SendMessage(h, CB_GETCURSEL, 0, 0) + 1) & 0xff;
hdd_ptr->bus = SendMessage(h, CB_GETCURSEL, 0, 0) & 0xff;
}
/* Make sure no file name is allowed with removable SCSI hard disks. */
@@ -1600,7 +1600,7 @@ disk_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
hdlv_current_sel = 0;
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
SendMessage(h, CB_SETCURSEL, temp_hdd[0].bus - 1, 0);
SendMessage(h, CB_SETCURSEL, temp_hdd[0].bus, 0);
} else {
hdlv_current_sel = -1;
}
@@ -1628,7 +1628,7 @@ disk_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
SendMessage(h, CB_SETCURSEL, temp_hdd[hdlv_current_sel].bus - 1, 0);
SendMessage(h, CB_SETCURSEL, temp_hdd[hdlv_current_sel].bus, 0);
disk_recalc_location_controls(hdlg, 0, 0);
}
ignore_change = 0;
@@ -1642,7 +1642,7 @@ disk_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
ignore_change = 1;
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
b = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
b = SendMessage(h, CB_GETCURSEL, 0, 0);
if (b == temp_hdd[hdlv_current_sel].bus)
goto hd_bus_skip;
disk_untrack(hdlv_current_sel);
@@ -1756,7 +1756,7 @@ hd_bus_skip:
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
hdlv_current_sel = 0;
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
SendMessage(h, CB_SETCURSEL, temp_hdd[0].bus - 1, 0);
SendMessage(h, CB_SETCURSEL, temp_hdd[0].bus, 0);
} else {
hdlv_current_sel = -1;
}