From: <sba...@us...> - 2023-06-10 04:21:44
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/10d667dc7e5b4f1b3f63b8f94ff724b6c81c8d85/ commit 10d667dc7e5b4f1b3f63b8f94ff724b6c81c8d85 Author: Miroslav Ďurčík <743...@us...> AuthorDate: Thu Apr 27 22:09:45 2023 +0200 feat: Move sound peripherals into its own menu "Peripherals/Sound" Created separate menu for sound peripherals, moved 4 devices there. Moved sound related peripherals' source files into standalone folder (like disk related stuff is in) See more https://sourceforge.net/u/arki55/tickets/4/ --- fuse.c | 6 +++--- machine.h | 6 +++--- menu.h | 1 + menu_data.dat | 1 + peripherals/Makefile.am | 20 ++++++++++---------- peripherals/{ => sound}/ay.c | 2 +- peripherals/{ => sound}/ay.h | 0 peripherals/{ => sound}/covox.c | 0 peripherals/{ => sound}/covox.h | 0 peripherals/{ => sound}/fuller.c | 2 +- peripherals/{ => sound}/fuller.h | 0 peripherals/{ => sound}/melodik.c | 0 peripherals/{ => sound}/melodik.h | 0 peripherals/{ => sound}/specdrum.c | 0 peripherals/{ => sound}/specdrum.h | 0 ui/options.dat | 11 +++++++---- ui/widget/menu.c | 6 ++++++ ui/widget/widget.c | 1 + ui/widget/widget.h | 7 +++++++ 19 files changed, 41 insertions(+), 22 deletions(-) diff --git a/fuse.c b/fuse.c index 8ecfb260..29b5e56c 100644 --- a/fuse.c +++ b/fuse.c @@ -65,12 +65,13 @@ #include "module.h" #include "movie.h" #include "mempool.h" -#include "peripherals/ay.h" #include "peripherals/dck.h" +#include "peripherals/sound/ay.h" +#include "peripherals/sound/fuller.h" +#include "peripherals/sound/melodik.h" #include "peripherals/disk/beta.h" #include "peripherals/disk/didaktik.h" #include "peripherals/disk/fdd.h" -#include "peripherals/fuller.h" #include "peripherals/ide/divide.h" #include "peripherals/ide/divmmc.h" #include "peripherals/ide/simpleide.h" @@ -81,7 +82,6 @@ #include "peripherals/if1.h" #include "peripherals/if2.h" #include "peripherals/kempmouse.h" -#include "peripherals/melodik.h" #include "peripherals/multiface.h" #include "peripherals/printer.h" #include "peripherals/scld.h" diff --git a/machine.h b/machine.h index 1afd4d4f..4cd1acc8 100644 --- a/machine.h +++ b/machine.h @@ -29,9 +29,9 @@ #include "libspectrum.h" #include "display.h" -#include "peripherals/ay.h" -#include "peripherals/covox.h" -#include "peripherals/specdrum.h" +#include "peripherals/sound/ay.h" +#include "peripherals/sound/covox.h" +#include "peripherals/sound/specdrum.h" #include "spectrum.h" typedef libspectrum_byte (*spectrum_unattached_port_fn)( void ); diff --git a/menu.h b/menu.h index cb14156f..4740a81e 100644 --- a/menu.h +++ b/menu.h @@ -139,6 +139,7 @@ MENU_CALLBACK( menu_options_general ); MENU_CALLBACK( menu_options_media ); MENU_CALLBACK( menu_options_sound ); MENU_CALLBACK( menu_options_peripherals_general ); +MENU_CALLBACK( menu_options_peripherals_sound ); MENU_CALLBACK( menu_options_peripherals_disk ); MENU_CALLBACK( menu_options_rzx ); MENU_CALLBACK( menu_options_movie ); diff --git a/menu_data.dat b/menu_data.dat index 0c0fa309..42bebe10 100644 --- a/menu_data.dat +++ b/menu_data.dat @@ -81,6 +81,7 @@ Options/_Sound..., Item Options/_Peripherals, Branch Options/Peripherals/_General..., Item +Options/Peripherals/_Sound..., Item Options/Peripherals/_Disk..., Item Options/_RZX..., Item diff --git a/peripherals/Makefile.am b/peripherals/Makefile.am index b9180290..cf9e1325 100644 --- a/peripherals/Makefile.am +++ b/peripherals/Makefile.am @@ -21,24 +21,24 @@ ## E-mail: phi...@sh... fuse_SOURCES += \ - peripherals/ay.c \ - peripherals/covox.c \ peripherals/dck.c \ - peripherals/fuller.c \ peripherals/if1.c \ peripherals/if2.c \ peripherals/joystick.c \ peripherals/kempmouse.c \ - peripherals/melodik.c \ peripherals/multiface.c \ peripherals/printer.c \ peripherals/scld.c \ peripherals/speccyboot.c \ - peripherals/specdrum.c \ peripherals/spectranet.c \ peripherals/ula.c \ peripherals/usource.c \ peripherals/ttx2000s.c \ + peripherals/sound/ay.c \ + peripherals/sound/covox.c \ + peripherals/sound/fuller.c \ + peripherals/sound/melodik.c \ + peripherals/sound/specdrum.c \ peripherals/disk/beta.c \ peripherals/disk/crc.c \ peripherals/disk/didaktik.c \ @@ -71,24 +71,24 @@ fuse_SOURCES += \ endif noinst_HEADERS += \ - peripherals/ay.h \ - peripherals/covox.h \ peripherals/dck.h \ - peripherals/fuller.h \ peripherals/if1.h \ peripherals/if2.h \ peripherals/joystick.h \ peripherals/kempmouse.h \ - peripherals/melodik.h \ peripherals/multiface.h \ peripherals/printer.h \ peripherals/scld.h \ peripherals/speccyboot.h \ - peripherals/specdrum.h \ peripherals/spectranet.h \ peripherals/ula.h \ peripherals/usource.h \ peripherals/ttx2000s.h \ + peripherals/sound/ay.h \ + peripherals/sound/covox.h \ + peripherals/sound/fuller.h \ + peripherals/sound/melodik.h \ + peripherals/sound/specdrum.h \ peripherals/disk/beta.h \ peripherals/disk/crc.h \ peripherals/disk/didaktik.h \ diff --git a/peripherals/ay.c b/peripherals/sound/ay.c similarity index 99% rename from peripherals/ay.c rename to peripherals/sound/ay.c index 7253ed63..04ac83b6 100644 --- a/peripherals/ay.c +++ b/peripherals/sound/ay.c @@ -32,7 +32,7 @@ #include "machine.h" #include "module.h" #include "periph.h" -#include "printer.h" +#include "peripherals/printer.h" #include "psg.h" #include "sound.h" diff --git a/peripherals/ay.h b/peripherals/sound/ay.h similarity index 100% rename from peripherals/ay.h rename to peripherals/sound/ay.h diff --git a/peripherals/covox.c b/peripherals/sound/covox.c similarity index 100% rename from peripherals/covox.c rename to peripherals/sound/covox.c diff --git a/peripherals/covox.h b/peripherals/sound/covox.h similarity index 100% rename from peripherals/covox.h rename to peripherals/sound/covox.h diff --git a/peripherals/fuller.c b/peripherals/sound/fuller.c similarity index 98% rename from peripherals/fuller.c rename to peripherals/sound/fuller.c index d9f8d8f5..6347c7c4 100644 --- a/peripherals/fuller.c +++ b/peripherals/sound/fuller.c @@ -29,7 +29,7 @@ #include "compat.h" #include "fuller.h" #include "infrastructure/startup_manager.h" -#include "joystick.h" +#include "peripherals/joystick.h" #include "module.h" #include "periph.h" #include "settings.h" diff --git a/peripherals/fuller.h b/peripherals/sound/fuller.h similarity index 100% rename from peripherals/fuller.h rename to peripherals/sound/fuller.h diff --git a/peripherals/melodik.c b/peripherals/sound/melodik.c similarity index 100% rename from peripherals/melodik.c rename to peripherals/sound/melodik.c diff --git a/peripherals/melodik.h b/peripherals/sound/melodik.h similarity index 100% rename from peripherals/melodik.h rename to peripherals/sound/melodik.h diff --git a/peripherals/specdrum.c b/peripherals/sound/specdrum.c similarity index 100% rename from peripherals/specdrum.c rename to peripherals/sound/specdrum.c diff --git a/peripherals/specdrum.h b/peripherals/sound/specdrum.h similarity index 100% rename from peripherals/specdrum.h rename to peripherals/sound/specdrum.h diff --git a/ui/options.dat b/ui/options.dat index 450e505d..82f66925 100644 --- a/ui/options.dat +++ b/ui/options.dat @@ -88,8 +88,6 @@ General Peripheral Options Checkbox, (K)empston joystick, joy_kempston, INPUT_KEY_k Checkbox, Kempston (m)ouse, kempston_mouse, INPUT_KEY_m Checkbox, (S)wap mouse buttons, mouse_swap_buttons, INPUT_KEY_s -Checkbox, (F)uller Box, fuller, INPUT_KEY_f -Checkbox, M(e)lodik, melodik, INPUT_KEY_e Checkbox, (I)nterface 1, interface1, INPUT_KEY_i Checkbox, In(t)erface 2, interface2, INPUT_KEY_t Checkbox, Mu(l)tiface One, multiface1, INPUT_KEY_l @@ -101,7 +99,6 @@ Checkbox, (Z)X Printer, zxprinter, INPUT_KEY_z #ifdef BUILD_SPECCYBOOT Checkbox, Speccy(B)oot interface, speccyboot, INPUT_KEY_b #endif -Checkbox, Spec(D)rum interface, specdrum, INPUT_KEY_d #ifdef BUILD_SPECTRANET Checkbox, Spectra(n)et, spectranet, INPUT_KEY_n Checkbox, Spe(c)tranet disable, spectranet_disable, INPUT_KEY_c @@ -110,10 +107,16 @@ Checkbox, Spe(c)tranet disable, spectranet_disable, INPUT_KEY_c Checkbox, TT(X)2000S, ttx2000s, INPUT_KEY_x #endif Checkbox, uSo(u)rce, usource, INPUT_KEY_u -Checkbox, C(o)vox interface, covox, INPUT_KEY_o Postcheck, periph_postcheck Posthook, periph_posthook +peripherals_sound +Sound Peripheral Options +Checkbox, (F)uller Box, fuller, INPUT_KEY_f +Checkbox, M(e)lodik, melodik, INPUT_KEY_e +Checkbox, Spec(D)rum interface, specdrum, INPUT_KEY_d +Checkbox, C(o)vox interface, covox, INPUT_KEY_o + peripherals_disk Disk Peripheral Options Checkbox, Simple (8)-bit IDE, simpleide_active, INPUT_KEY_8 diff --git a/ui/widget/menu.c b/ui/widget/menu.c index ba22a2c1..b32d6ca4 100644 --- a/ui/widget/menu.c +++ b/ui/widget/menu.c @@ -483,6 +483,12 @@ menu_options_peripherals_general( int action ) widget_do_peripherals_general(); } +void +menu_options_peripherals_sound( int action ) +{ + widget_do_peripherals_sound(); +} + void menu_options_peripherals_disk( int action ) { diff --git a/ui/widget/widget.c b/ui/widget/widget.c index 2689594d..90085eb0 100644 --- a/ui/widget/widget.c +++ b/ui/widget/widget.c @@ -689,6 +689,7 @@ widget_t widget_data[] = { { widget_memory_draw, NULL, widget_memory_keyhandler }, { widget_roms_draw, widget_roms_finish, widget_roms_keyhandler }, { widget_peripherals_general_draw, widget_options_finish, widget_peripherals_general_keyhandler }, + { widget_peripherals_sound_draw, widget_options_finish, widget_peripherals_sound_keyhandler }, { widget_peripherals_disk_draw, widget_options_finish, widget_peripherals_disk_keyhandler }, { widget_query_draw, widget_query_finish, widget_query_keyhandler }, { widget_query_save_draw,widget_query_finish, widget_query_save_keyhandler }, diff --git a/ui/widget/widget.h b/ui/widget/widget.h index 861e598b..63797cb2 100644 --- a/ui/widget/widget.h +++ b/ui/widget/widget.h @@ -56,6 +56,7 @@ typedef enum widget_type { WIDGET_TYPE_MEMORYBROWSER, /* Memory browser widget */ WIDGET_TYPE_ROM, /* ROM selector widget */ WIDGET_TYPE_PERIPHERALS_GENERAL, /* General peripherals options */ + WIDGET_TYPE_PERIPHERALS_SOUND, /* Sound peripherals options */ WIDGET_TYPE_PERIPHERALS_DISK, /* Disk peripherals options */ WIDGET_TYPE_QUERY, /* Query (yes/no) */ WIDGET_TYPE_QUERY_SAVE, /* Query (save/don't save/cancel) */ @@ -244,6 +245,12 @@ static inline int widget_do_peripherals_general( void ) return widget_do( WIDGET_TYPE_PERIPHERALS_GENERAL, NULL ); } +/* Sound peripherals options */ +static inline int widget_do_peripherals_sound( void ) +{ + return widget_do( WIDGET_TYPE_PERIPHERALS_SOUND, NULL ); +} + /* Disk peripherals options */ static inline int widget_do_peripherals_disk( void ) { |