Skip to content

Commit 0d58b21

Browse files
committed
Merge branch 'clean' into main
2 parents 9c86347 + af24424 commit 0d58b21

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

vice/src/c64/cart/dqbb.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ static int dqbb_deactivate(void)
315315
static int set_dqbb_enabled(int value, void *param)
316316
{
317317
int val = value ? 1 : 0;
318+
DBG(("set_dqbb_enabled: val:%d", val));
318319

319320
if ((!val) && (dqbb_enabled)) {
320321
cart_power_off();
@@ -339,6 +340,7 @@ static int set_dqbb_enabled(int value, void *param)
339340
dqbb_reset();
340341
dqbb_change_config();
341342
}
343+
DBG(("set_dqbb_enabled: dqbb_enabled:%d", dqbb_enabled));
342344
return 0;
343345
}
344346

@@ -374,6 +376,7 @@ static int set_dqbb_image_write(int val, void *param)
374376

375377
static int set_dqbb_size(int val, void *param)
376378
{
379+
DBG(("set_dqbb_size: val:%d", val));
377380
if (val != dqbb_size) {
378381
if ((val == 16) ||
379382
(val == 32) ||
@@ -389,16 +392,18 @@ static int set_dqbb_size(int val, void *param)
389392
}
390393
DBG(("set_dqbb_size size: %d mask: 0x%02x", dqbb_size, (unsigned int)dqbb_bank_mask));
391394
} else {
395+
DBG(("set_dqbb_size: (error) dqbb_size:%d", dqbb_size));
392396
return -1;
393397
}
394398
}
399+
DBG(("set_dqbb_size: (ok) dqbb_size:%d", dqbb_size));
395400
return 0;
396401
}
397402

398403
static int set_dqbb_mode(int val, void *param)
399404
{
400-
dqbb_mode_switch = (val == 0) ? DQBB_MODE_C128 : DQBB_MODE_C64;
401-
DBG(("set_dqbb_mode: %s", dqbb_mode_switch == DQBB_MODE_C64 ? "C64" : "C128"));
405+
dqbb_mode_switch = (val == DQBB_MODE_C128) ? DQBB_MODE_C128 : DQBB_MODE_C64;
406+
DBG(("set_dqbb_mode: val:%d dqbb_mode_switch: %s", val, dqbb_mode_switch == DQBB_MODE_C64 ? "C64" : "C128"));
402407
if (dqbb_enabled) {
403408
dqbb_change_config();
404409
}
@@ -414,11 +419,11 @@ static const resource_string_t resources_string[] = {
414419
};
415420

416421
static const resource_int_t resources_int[] = {
417-
{ "DQBB", 0, RES_EVENT_STRICT, NULL,
422+
{ "DQBB", 0, RES_EVENT_SAME, NULL,
418423
&dqbb_enabled, set_dqbb_enabled, NULL },
419-
{ "DQBBSize", 16, RES_EVENT_STRICT, NULL,
424+
{ "DQBBSize", 16, RES_EVENT_SAME, NULL,
420425
&dqbb_size, set_dqbb_size, NULL },
421-
{ "DQBBMode", DQBB_MODE_C64, RES_EVENT_STRICT, NULL,
426+
{ "DQBBMode", DQBB_MODE_C64, RES_EVENT_SAME, NULL,
422427
&dqbb_mode_switch, set_dqbb_mode, NULL },
423428
{ "DQBBImageWrite", 0, RES_EVENT_NO, NULL,
424429
&dqbb_write_image, set_dqbb_image_write, NULL },

vice/src/resources.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,7 @@ int resources_set_event_safe(void)
10121012
switch (resources[i].type) {
10131013
case RES_INTEGER:
10141014
if (resources[i].event_relevant == RES_EVENT_STRICT) {
1015+
DBG(("seting event-safe resource value for '%s'", resources[i].name));
10151016
if ((*resources[i].set_func_int)(vice_ptr_to_int(resources[i].event_strict_value),
10161017
resources[i].param) < 0) {
10171018
log_error(LOG_DEFAULT, "failed to set event-safe resource value for '%s'", resources[i].name);
@@ -1021,6 +1022,7 @@ int resources_set_event_safe(void)
10211022
break;
10221023
case RES_STRING:
10231024
if (resources[i].event_relevant == RES_EVENT_STRICT) {
1025+
DBG(("seting event-safe resource value for '%s'", resources[i].name));
10241026
if ((*resources[i].set_func_string)((const char *)(resources[i].event_strict_value),
10251027
resources[i].param) < 0) {
10261028
log_error(LOG_DEFAULT, "failed to set event-safe resource value for '%s'", resources[i].name);

0 commit comments

Comments
 (0)