More fixed and updates. No new code or features.
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
* it on Windows XP, and possibly also Vista. Use the
|
* it on Windows XP, and possibly also Vista. Use the
|
||||||
* -DANSI_CFG for use on these systems.
|
* -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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -1082,15 +1082,15 @@ static void
|
|||||||
save_disks(const char *cat)
|
save_disks(const char *cat)
|
||||||
{
|
{
|
||||||
char temp[24], tmp2[64];
|
char temp[24], tmp2[64];
|
||||||
char *p;
|
const char *str;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
for (c = 0; c < HDD_NUM; c++) {
|
for (c = 0; c < HDD_NUM; c++) {
|
||||||
sprintf(temp, "hdd_%02i_parameters", c+1);
|
sprintf(temp, "hdd_%02i_parameters", c+1);
|
||||||
if (hdd_is_valid(c)) {
|
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",
|
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);
|
config_set_string(cat, temp, tmp2);
|
||||||
} else {
|
} else {
|
||||||
config_delete_var(cat, temp);
|
config_delete_var(cat, temp);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Driver for the ESDI controller (WD1007-vse1) for PC/AT.
|
* 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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -235,7 +235,10 @@ hdc_writew(uint16_t port, uint16_t val, void *priv)
|
|||||||
dev->pos = 0;
|
dev->pos = 0;
|
||||||
dev->status = STAT_BUSY;
|
dev->status = STAT_BUSY;
|
||||||
timer_clock();
|
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();
|
timer_update_outstanding();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -412,6 +415,10 @@ hdc_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
dev->status = STAT_BUSY;
|
dev->status = STAT_BUSY;
|
||||||
}
|
}
|
||||||
dev->fdisk = val;
|
dev->fdisk = val;
|
||||||
|
|
||||||
|
/* Lower IRQ on IRQ disable. */
|
||||||
|
if ((val & 2) && !(dev->fdisk & 0x02))
|
||||||
|
picintc(1 << 14);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -435,7 +442,10 @@ hdc_readw(uint16_t port, void *priv)
|
|||||||
next_sector(dev);
|
next_sector(dev);
|
||||||
dev->status = STAT_BUSY;
|
dev->status = STAT_BUSY;
|
||||||
timer_clock();
|
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();
|
timer_update_outstanding();
|
||||||
} else {
|
} else {
|
||||||
ui_sb_icon_update(SB_HDD|HDD_BUS_ESDI, 0);
|
ui_sb_icon_update(SB_HDD|HDD_BUS_ESDI, 0);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* based design. Most cards were WD1003-WA2 or -WAH, where the
|
* based design. Most cards were WD1003-WA2 or -WAH, where the
|
||||||
* -WA2 cards had a floppy controller as well (to save space.)
|
* -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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||||
@@ -131,17 +131,21 @@ typedef struct {
|
|||||||
static __inline void
|
static __inline void
|
||||||
irq_raise(hdc_t *dev)
|
irq_raise(hdc_t *dev)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
/* If not already pending.. */
|
/* If not already pending.. */
|
||||||
if (! dev->irqstat) {
|
if (! dev->irqstat) {
|
||||||
|
#endif
|
||||||
/* If enabled in the control register.. */
|
/* If enabled in the control register.. */
|
||||||
if (! (dev->fdisk&0x02)) {
|
if (! (dev->fdisk & 0x02)) {
|
||||||
/* .. raise IRQ14. */
|
/* .. raise IRQ14. */
|
||||||
picint(1<<14);
|
picint(1<<14);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remember this. */
|
/* Remember this. */
|
||||||
dev->irqstat = 1;
|
dev->irqstat = 1;
|
||||||
|
#if 0
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -151,7 +155,7 @@ irq_lower(hdc_t *dev)
|
|||||||
/* If raised.. */
|
/* If raised.. */
|
||||||
if (dev->irqstat) {
|
if (dev->irqstat) {
|
||||||
/* If enabled in the control register.. */
|
/* If enabled in the control register.. */
|
||||||
if (! (dev->fdisk&0x02)) {
|
if (! (dev->fdisk & 0x02)) {
|
||||||
/* .. drop IRQ14. */
|
/* .. drop IRQ14. */
|
||||||
picintc(1<<14);
|
picintc(1<<14);
|
||||||
}
|
}
|
||||||
@@ -411,7 +415,10 @@ hdc_writew(uint16_t port, uint16_t val, void *priv)
|
|||||||
dev->pos = 0;
|
dev->pos = 0;
|
||||||
dev->status = STAT_BUSY;
|
dev->status = STAT_BUSY;
|
||||||
timer_clock();
|
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();
|
timer_update_outstanding();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -481,6 +488,10 @@ hdc_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
timer_update_outstanding();
|
timer_update_outstanding();
|
||||||
}
|
}
|
||||||
dev->fdisk = val;
|
dev->fdisk = val;
|
||||||
|
|
||||||
|
/* Lower IRQ on IRQ disable. */
|
||||||
|
if ((val & 2) && !(dev->fdisk & 0x02))
|
||||||
|
picintc(1 << 14);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -503,7 +514,10 @@ hdc_readw(uint16_t port, void *priv)
|
|||||||
next_sector(dev);
|
next_sector(dev);
|
||||||
dev->status = STAT_BUSY;
|
dev->status = STAT_BUSY;
|
||||||
timer_clock();
|
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();
|
timer_update_outstanding();
|
||||||
} else {
|
} else {
|
||||||
ui_sb_icon_update(SB_HDD|HDD_BUS_ST506, 0);
|
ui_sb_icon_update(SB_HDD|HDD_BUS_ST506, 0);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Common code to handle all sorts of hard disk images.
|
* 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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -83,7 +83,7 @@ hdd_count(int bus)
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=0; i<HDD_NUM; i++) {
|
for (i = 0; i < HDD_NUM; i++) {
|
||||||
if (hdd[i].bus == bus)
|
if (hdd[i].bus == bus)
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ hdd_count(int bus)
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
hdd_string_to_bus(char *str, int cdrom)
|
hdd_string_to_bus(const char *str, int cdrom)
|
||||||
{
|
{
|
||||||
if (! strcmp(str, "none"))
|
if (! strcmp(str, "none"))
|
||||||
return(HDD_BUS_DISABLED);
|
return(HDD_BUS_DISABLED);
|
||||||
@@ -160,10 +160,10 @@ no_cdrom:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
hdd_bus_to_string(int bus, int cdrom)
|
hdd_bus_to_string(int bus, int cdrom)
|
||||||
{
|
{
|
||||||
char *s = "none";
|
const char *s = "none";
|
||||||
|
|
||||||
switch (bus) {
|
switch (bus) {
|
||||||
case HDD_BUS_DISABLED:
|
case HDD_BUS_DISABLED:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Definitions for the hard disk image handler.
|
* 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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -110,8 +110,8 @@ extern int hdd_do_log;
|
|||||||
extern void hdd_log(const char *fmt, ...);
|
extern void hdd_log(const char *fmt, ...);
|
||||||
extern int hdd_init(void);
|
extern int hdd_init(void);
|
||||||
extern int hdd_count(int bus);
|
extern int hdd_count(int bus);
|
||||||
extern int hdd_string_to_bus(char *str, int cdrom);
|
extern int hdd_string_to_bus(const char *str, int cdrom);
|
||||||
extern char *hdd_bus_to_string(int bus, int cdrom);
|
extern const char *hdd_bus_to_string(int bus, int cdrom);
|
||||||
extern int hdd_is_valid(int c);
|
extern int hdd_is_valid(int c);
|
||||||
|
|
||||||
extern int hdd_image_load(int id);
|
extern int hdd_image_load(int id);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Definitions for the mouse driver.
|
* 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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.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 void *mouse_ps2_init(const device_t *);
|
||||||
|
|
||||||
extern const device_t mouse_logibus_device;
|
extern const device_t mouse_logibus_device;
|
||||||
|
extern const device_t mouse_logibus_internal_device;
|
||||||
extern const device_t mouse_msinport_device;
|
extern const device_t mouse_msinport_device;
|
||||||
#if 0
|
#if 0
|
||||||
extern const device_t mouse_genibus_device;
|
extern const device_t mouse_genibus_device;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
*
|
*
|
||||||
* Based on an early driver for MINIX 1.5.
|
* 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>
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
|
|
||||||
#define MOUSE_PORT 0x023c /* default */
|
#define MOUSE_PORT 0x023c /* default */
|
||||||
#define MOUSE_IRQ 5 /* default */
|
#define MOUSE_IRQ 5 /* default */
|
||||||
|
#define MOUSE_IRQ_INTERNAL 2 /* IRQ for internal mice */
|
||||||
#define MOUSE_BUTTONS 2 /* default */
|
#define MOUSE_BUTTONS 2 /* default */
|
||||||
#define MOUSE_DEBUG 0
|
#define MOUSE_DEBUG 0
|
||||||
|
|
||||||
@@ -709,10 +710,15 @@ bm_init(const device_t *info)
|
|||||||
memset(dev, 0x00, sizeof(mouse_t));
|
memset(dev, 0x00, sizeof(mouse_t));
|
||||||
dev->name = info->name;
|
dev->name = info->name;
|
||||||
dev->type = info->local;
|
dev->type = info->local;
|
||||||
|
if (info->config != NULL) {
|
||||||
dev->irq = device_get_config_int("irq");
|
dev->irq = device_get_config_int("irq");
|
||||||
i = device_get_config_int("buttons");
|
i = device_get_config_int("buttons");
|
||||||
if (i > 2)
|
if (i > 2)
|
||||||
dev->flags |= FLAG_3BTN;
|
dev->flags |= FLAG_3BTN;
|
||||||
|
} else {
|
||||||
|
dev->irq = MOUSE_IRQ_INTERNAL; /*hardwired*/
|
||||||
|
i = 2;
|
||||||
|
}
|
||||||
|
|
||||||
pclog("MOUSE: %s (I/O=%04x, IRQ=%d, buttons=%d)\n",
|
pclog("MOUSE: %s (I/O=%04x, IRQ=%d, buttons=%d)\n",
|
||||||
dev->name, MOUSE_PORT, dev->irq, i);
|
dev->name, MOUSE_PORT, dev->irq, i);
|
||||||
@@ -802,6 +808,15 @@ const device_t mouse_logibus_device = {
|
|||||||
bm_config
|
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 = {
|
const device_t mouse_msinport_device = {
|
||||||
"Microsoft Bus Mouse (InPort)",
|
"Microsoft Bus Mouse (InPort)",
|
||||||
DEVICE_ISA,
|
DEVICE_ISA,
|
||||||
|
|||||||
@@ -189,7 +189,7 @@
|
|||||||
* including the later update (DS12887A) which implemented a
|
* including the later update (DS12887A) which implemented a
|
||||||
* "century" register to be compatible with Y2K.
|
* "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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -488,15 +488,18 @@ timer_tick(nvr_t *nvr)
|
|||||||
local_t *local = (local_t *)nvr->data;
|
local_t *local = (local_t *)nvr->data;
|
||||||
|
|
||||||
/* Only update it there is no SET in progress. */
|
/* 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. */
|
/* Set the UIP bit, announcing the update. */
|
||||||
local->stat = REGA_UIP;
|
local->stat = REGA_UIP;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Not sure if this is needed here. */
|
||||||
timer_recalc(nvr, 0);
|
timer_recalc(nvr, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Schedule the actual update. */
|
/* Schedule the actual update. */
|
||||||
local->ecount = (int64_t)((244.0 + 1984.0) * TIMER_USEC);
|
local->ecount = (int64_t)((244.0 + 1984.0) * TIMER_USEC);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
* bit 1: b8000 memory available
|
* bit 1: b8000 memory available
|
||||||
* 0000:046a: 00 jim 250 01 jim 350
|
* 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>
|
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
*
|
*
|
||||||
@@ -264,11 +264,6 @@ rtc_start(nvr_t *nvr)
|
|||||||
rtc_time_get(nvr->regs, &tm);
|
rtc_time_get(nvr->regs, &tm);
|
||||||
nvr_time_set(&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. */
|
/* Calculate all bytes with XOR. */
|
||||||
sum = 0x00;
|
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];
|
sum += ptr[i];
|
||||||
|
|
||||||
return(sum);
|
return(sum);
|
||||||
@@ -620,7 +615,11 @@ europc_boot(const device_t *info)
|
|||||||
/* Set up game port. */
|
/* Set up game port. */
|
||||||
b = (sys->nvr.regs[MRTC_CONF_C] & 0xfc);
|
b = (sys->nvr.regs[MRTC_CONF_C] & 0xfc);
|
||||||
if (mouse_type == MOUSE_INTERNAL) {
|
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) {
|
} else if (game_enabled) {
|
||||||
b |= 0x02; /* enable port as joysticks */
|
b |= 0x02; /* enable port as joysticks */
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/ui/lang/VARCem-BY.str
Normal file
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
BIN
src/ui/lang/VARCem-LT.str
Normal file
Binary file not shown.
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Common resources for the application.
|
* 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>
|
* 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_3201,IDC_ABOUT_ICON,5,55,40,10
|
||||||
LTEXT STR_3202,IDC_ABOUT_ICON,50,55,195,30
|
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
|
PUSHBUTTON STR_LOCALIZE,IDC_LOCALIZE,5,140,60,14
|
||||||
|
|
||||||
|
|||||||
@@ -173,8 +173,9 @@ static BOOL CALLBACK
|
|||||||
#endif
|
#endif
|
||||||
dlg_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
dlg_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
static HBRUSH brush = NULL;
|
||||||
wchar_t temp[128];
|
wchar_t temp[128];
|
||||||
static HBITMAP hBmp;
|
HBITMAP hBmp;
|
||||||
HWND h;
|
HWND h;
|
||||||
|
|
||||||
switch (message) {
|
switch (message) {
|
||||||
@@ -239,17 +240,18 @@ static HBITMAP hBmp;
|
|||||||
|
|
||||||
case WM_CTLCOLORSTATIC:
|
case WM_CTLCOLORSTATIC:
|
||||||
if ((HWND)lParam == GetDlgItem(hdlg, IDC_DONATE)) {
|
if ((HWND)lParam == GetDlgItem(hdlg, IDC_DONATE)) {
|
||||||
|
/* Grab background color from dialog window. */
|
||||||
HDC hDC = GetDC(hdlg);
|
HDC hDC = GetDC(hdlg);
|
||||||
COLORREF col = GetBkColor(hDC);
|
COLORREF col = GetBkColor(hDC);
|
||||||
|
|
||||||
|
/* Set as background color for static controli.. */
|
||||||
hDC = (HDC)wParam;
|
hDC = (HDC)wParam;
|
||||||
SetBkColor(hDC, col);
|
SetBkColor(hDC, col);
|
||||||
|
|
||||||
#if 1
|
/* .. and also return that as paint color. */
|
||||||
return (LRESULT)CreateSolidBrush(col);
|
if (brush == NULL)
|
||||||
#else
|
brush = CreateSolidBrush(col);
|
||||||
return (LRESULT)CreateSolidBrush(RGB(0,255,0));
|
return (LRESULT)brush;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,92 @@ static const dllimp_t png_imports[] = {
|
|||||||
#endif
|
#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
|
static HBITMAP
|
||||||
CopySurface(IDirectDrawSurface4 *pDDSurface)
|
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.. */
|
/* Not strictly needed, but hey.. */
|
||||||
static void
|
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.. */
|
/* Not strictly needed, but hey.. */
|
||||||
static void
|
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. */
|
/* 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);
|
png_error_handler, png_warning_handler);
|
||||||
if (png_ptr == NULL) {
|
if (png_ptr == NULL) {
|
||||||
(void)fclose(fp);
|
(void)fclose(fp);
|
||||||
@@ -645,7 +731,7 @@ ddraw_blit(int x, int y, int y1, int y2, int w, int h)
|
|||||||
static void
|
static void
|
||||||
ddraw_close(void)
|
ddraw_close(void)
|
||||||
{
|
{
|
||||||
pclog("DDRAW: close (fs=%d)\n", (lpdds_back2 != NULL)?1:0);
|
pclog("DDRAW: close\n");
|
||||||
|
|
||||||
video_setblit(NULL);
|
video_setblit(NULL);
|
||||||
|
|
||||||
@@ -745,21 +831,42 @@ ddraw_init(int fs)
|
|||||||
{
|
{
|
||||||
DDSURFACEDESC2 ddsd;
|
DDSURFACEDESC2 ddsd;
|
||||||
LPDIRECTDRAW lpdd;
|
LPDIRECTDRAW lpdd;
|
||||||
HWND h = hwndRender;
|
HRESULT hr;
|
||||||
|
DWORD dw;
|
||||||
|
HWND h;
|
||||||
|
|
||||||
pclog("DDraw: initializing (fs=%d)\n", fs);
|
pclog("DDraw: initializing (fs=%d)\n", fs);
|
||||||
|
|
||||||
cgapal_rebuild();
|
cgapal_rebuild();
|
||||||
|
|
||||||
if (FAILED(DirectDrawCreate(NULL, &lpdd, NULL))) return(0);
|
hr = DirectDrawCreate(NULL, &lpdd, NULL);
|
||||||
|
if (FAILED(hr)) {
|
||||||
if (FAILED(lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)&lpdd4)))
|
pclog("DDRAW: cannot create an instance (%s)\n", GetError(hr));
|
||||||
return(0);
|
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->Release();
|
||||||
|
|
||||||
atexit(ddraw_close);
|
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));
|
memset(&ddsd, 0, sizeof(ddsd));
|
||||||
ddsd.dwSize = sizeof(ddsd);
|
ddsd.dwSize = sizeof(ddsd);
|
||||||
@@ -891,47 +998,6 @@ const vidapi_t ddraw_vidapi = {
|
|||||||
|
|
||||||
#if 0
|
#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) {
|
if (fs) {
|
||||||
ddraw_w = GetSystemMetrics(SM_CXSCREEN);
|
ddraw_w = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Handle language support for the platform.
|
* 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>
|
* 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. */
|
/* Add a language to the list of supported languages. */
|
||||||
static void
|
static void
|
||||||
lang_add(lang_t *ptr)
|
lang_add(lang_t *ptr, int sort)
|
||||||
{
|
{
|
||||||
lang_t *p, *pp;
|
lang_t *p, *pp;
|
||||||
|
lang_t *prev;
|
||||||
|
|
||||||
/* Create a copy of the entry data. */
|
/* Create a copy of the entry data. */
|
||||||
pp = (lang_t *)malloc(sizeof(lang_t));
|
pp = (lang_t *)malloc(sizeof(lang_t));
|
||||||
memcpy(pp, ptr, 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. */
|
/* 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;
|
languages = pp;
|
||||||
} else {
|
} else {
|
||||||
p = languages;
|
while (p != NULL) {
|
||||||
while (p->next != NULL)
|
if (wcscmp(pp->name, p->name) > 0) {
|
||||||
|
prev = p;
|
||||||
p = p->next;
|
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! */
|
/* We got one more! */
|
||||||
@@ -149,11 +163,8 @@ lang_scan(void)
|
|||||||
DIR *dir;
|
DIR *dir;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
/* First, add our native language. */
|
/* None yet.. */
|
||||||
languages_num = 0;
|
languages_num = 0;
|
||||||
memset(&lang, 0x00, sizeof(lang));
|
|
||||||
lang.id = 0x0409;
|
|
||||||
lang_add(&lang);
|
|
||||||
|
|
||||||
/* Open the "language modules" directory. */
|
/* Open the "language modules" directory. */
|
||||||
swprintf(path, sizeof_w(temp), L"%ls%ls", emu_path, LANGUAGE_PATH);
|
swprintf(path, sizeof_w(temp), L"%ls%ls", emu_path, LANGUAGE_PATH);
|
||||||
@@ -242,11 +253,20 @@ lang_scan(void)
|
|||||||
wcscpy(ptr, str);
|
wcscpy(ptr, str);
|
||||||
lang.email = (const wchar_t *)ptr;
|
lang.email = (const wchar_t *)ptr;
|
||||||
|
|
||||||
|
/* Set the name of this language. */
|
||||||
|
lang_setname(&lang);
|
||||||
|
|
||||||
/* Add this language. */
|
/* Add this language. */
|
||||||
lang_add(&lang);
|
lang_add(&lang, 1);
|
||||||
}
|
}
|
||||||
(void)closedir(dir);
|
(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. */
|
/* Add this language to the Languages menu. */
|
||||||
menu_add_item(IDM_LANGUAGE, i, ptr->name);
|
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. */
|
/* Set active language. */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Implementation of the New Floppy/ZIP Image dialog.
|
* 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>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.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)) {
|
if (wcslen(temp_path) && (wcslen(temp_path) <= 256)) {
|
||||||
twcs = &temp_path[wcslen(temp_path)];
|
twcs = &temp_path[wcslen(temp_path)];
|
||||||
twcs[0] = L'.';
|
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[1] = L'8';
|
||||||
twcs[2] = L'6';
|
twcs[2] = L'6';
|
||||||
twcs[3] = L'f';
|
twcs[3] = L'f';
|
||||||
} else {
|
} else {
|
||||||
twcs[1] = L'i';
|
twcs[1] = L'i';
|
||||||
twcs[2] = L'm';
|
twcs[2] = L'm';
|
||||||
twcs[3] = L'g';
|
twcs[3] = L'a';
|
||||||
}
|
}
|
||||||
|
twcs[4] = L'\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h = GetDlgItem(hdlg, IDC_EDIT_FILE_NAME);
|
h = GetDlgItem(hdlg, IDC_EDIT_FILE_NAME);
|
||||||
|
|||||||
@@ -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) {
|
if ((hd_listview_items > 0) || is_add_dlg) {
|
||||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
||||||
bus = SendMessage(h, CB_GETCURSEL, 0, 0) + 1;
|
bus = SendMessage(h, CB_GETCURSEL, 0, 0);
|
||||||
|
|
||||||
switch(bus) {
|
switch(bus) {
|
||||||
case HDD_BUS_ST506: /* ST506 MFM/RLL */
|
case HDD_BUS_ST506: /* ST506 MFM/RLL */
|
||||||
@@ -940,7 +940,7 @@ disk_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
case IDOK:
|
case IDOK:
|
||||||
if (!(existing & 2)) {
|
if (!(existing & 2)) {
|
||||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
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. */
|
/* 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);
|
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
||||||
hdlv_current_sel = 0;
|
hdlv_current_sel = 0;
|
||||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
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 {
|
} else {
|
||||||
hdlv_current_sel = -1;
|
hdlv_current_sel = -1;
|
||||||
}
|
}
|
||||||
@@ -1628,7 +1628,7 @@ disk_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
ignore_change = 1;
|
ignore_change = 1;
|
||||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
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);
|
disk_recalc_location_controls(hdlg, 0, 0);
|
||||||
}
|
}
|
||||||
ignore_change = 0;
|
ignore_change = 0;
|
||||||
@@ -1642,7 +1642,7 @@ disk_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
ignore_change = 1;
|
ignore_change = 1;
|
||||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
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)
|
if (b == temp_hdd[hdlv_current_sel].bus)
|
||||||
goto hd_bus_skip;
|
goto hd_bus_skip;
|
||||||
disk_untrack(hdlv_current_sel);
|
disk_untrack(hdlv_current_sel);
|
||||||
@@ -1756,7 +1756,7 @@ hd_bus_skip:
|
|||||||
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
ListView_SetItemState(h, 0, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
|
||||||
hdlv_current_sel = 0;
|
hdlv_current_sel = 0;
|
||||||
h = GetDlgItem(hdlg, IDC_COMBO_HD_BUS);
|
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 {
|
} else {
|
||||||
hdlv_current_sel = -1;
|
hdlv_current_sel = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user