forked from Dniel97/segatools
chusan: fixed SP/CVT switching
This commit is contained in:
parent
8ebdf67d6e
commit
3bf223c04e
@ -100,7 +100,7 @@ static DWORD CALLBACK chusan_pre_startup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool *dipsw = &chusan_hook_cfg.platform.dipsw.dipsw[0];
|
bool *dipsw = &chusan_hook_cfg.platform.dipsw.dipsw[0];
|
||||||
bool *is_sp = dipsw + 2;
|
bool is_cvt = dipsw[2];
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
@ -113,15 +113,15 @@ static DWORD CALLBACK chusan_pre_startup(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
dprintf("DipSw: Cab Type: %s\n", is_sp ? "SP" : "CVT");
|
dprintf("DipSw: Cab Type: %s\n", is_cvt ? "CVT" : "SP");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int first_port = is_sp ? 20 : 2;
|
unsigned int first_port = is_cvt ? 2 : 20;
|
||||||
|
|
||||||
if (is_sp) {
|
if (!is_cvt) {
|
||||||
hr = vfd_hook_init(2);
|
hr = vfd_hook_init(2);
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
@ -136,7 +136,7 @@ static DWORD CALLBACK chusan_pre_startup(void)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = sg_reader_hook_init(&chusan_hook_cfg.aime, 4, is_sp ? 3: 2, chusan_hook_mod);
|
hr = sg_reader_hook_init(&chusan_hook_cfg.aime, 4, is_cvt ? 2: 3, chusan_hook_mod);
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
Reference in New Issue
Block a user