static int handle_custom_action(int action) { write_log("handle_custom_action %d\n", action); if (action >= INPUTEVENT_SPC_DISKSWAPPER_0_0 && action <= INPUTEVENT_SPC_DISKSWAPPER_3_19) { int offset = action - INPUTEVENT_SPC_DISKSWAPPER_0_0; int drive = offset / AMIGA_FLOPPY_LIST_SIZE; int entry = offset % AMIGA_FLOPPY_LIST_SIZE; //disk_swap(drive, entry); amiga_floppy_set_from_list(drive, entry); return 1; } return 0; }
static int handle_custom_action(int action, int state) { write_log("handle_custom_action %d\n", action); if (action >= INPUTEVENT_SPC_DISKSWAPPER_0_0 && action <= INPUTEVENT_SPC_DISKSWAPPER_3_19) { if (state) { int offset = action - INPUTEVENT_SPC_DISKSWAPPER_0_0; int drive = offset / AMIGA_FLOPPY_LIST_SIZE; int entry = offset % AMIGA_FLOPPY_LIST_SIZE; //disk_swap(drive, entry); amiga_floppy_set_from_list(drive, entry); } return 1; } switch(action) { #ifdef PROWIZARD case INPUTEVENT_UAE_MODULE_RIPPER: if (state) { moduleripper(); } return 1; #endif #ifdef DRIVESOUND case INPUTEVENT_UAE_MUTE_FLOPPY_SOUNDS: if (state) { bool mute = false; if (currprefs.floppyslots[0].dfxclick) { mute = true; } write_log("mute floppy sounds? %d\n", mute); for (int i = 0; i < 4; i++) { //changed_prefs.floppyslots[i].dfxclick = !mute; currprefs.floppyslots[i].dfxclick = !mute; } /* FIXME: Use notification instead */ if (!mute) { error_log("%s", "Floppy sounds enabled"); } else { error_log("%s", "Floppy sounds disabled"); } } return 1; #endif } return 0; }