Mercurial > repos > blastem
comparison nuklear_ui/blastem_nuklear.c @ 1568:d14490dee01f
Add sync_source to default.cfg and the Nuklear UI
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 17 Apr 2018 23:05:08 -0700 |
parents | 87350caf6dab |
children | 0ec89dadb36d |
comparison
equal
deleted
inserted
replaced
1567:66387b1645e4 | 1568:d14490dee01f |
---|---|
774 nk_end(context); | 774 nk_end(context); |
775 } | 775 } |
776 } | 776 } |
777 void view_system_settings(struct nk_context *context) | 777 void view_system_settings(struct nk_context *context) |
778 { | 778 { |
779 const char *sync_opts[] = { | |
780 "video", | |
781 "audio" | |
782 }; | |
783 const uint32_t num_sync_opts = sizeof(sync_opts)/sizeof(*sync_opts); | |
784 static int32_t selected_sync = -1; | |
785 if (selected_sync < 0) { | |
786 selected_sync = find_match(sync_opts, num_sync_opts, "system\0sync_source\0", "video"); | |
787 } | |
779 const char *regions[] = { | 788 const char *regions[] = { |
780 "J - Japan", | 789 "J - Japan", |
781 "U - Americas", | 790 "U - Americas", |
782 "E - Europe" | 791 "E - Europe" |
783 }; | 792 }; |
831 | 840 |
832 uint32_t width = render_width(); | 841 uint32_t width = render_width(); |
833 uint32_t height = render_height(); | 842 uint32_t height = render_height(); |
834 if (nk_begin(context, "System Settings", nk_rect(0, 0, width, height), 0)) { | 843 if (nk_begin(context, "System Settings", nk_rect(0, 0, width, height), 0)) { |
835 nk_layout_row_static(context, 30, width > 300 ? 300 : width, 2); | 844 nk_layout_row_static(context, 30, width > 300 ? 300 : width, 2); |
845 selected_sync = settings_dropdown(context, "Sync Source", sync_opts, num_sync_opts, selected_sync, "system\0sync_source\0"); | |
836 settings_int_property(context, "68000 Clock Divider", "", "clocks\0m68k_divider\0", 7, 1, 53); | 846 settings_int_property(context, "68000 Clock Divider", "", "clocks\0m68k_divider\0", 7, 1, 53); |
837 settings_toggle(context, "Remember ROM Path", "ui\0remember_path\0", 1); | 847 settings_toggle(context, "Remember ROM Path", "ui\0remember_path\0", 1); |
838 selected_region = settings_dropdown_ex(context, "Default Region", region_codes, regions, num_regions, selected_region, "system\0default_region\0"); | 848 selected_region = settings_dropdown_ex(context, "Default Region", region_codes, regions, num_regions, selected_region, "system\0default_region\0"); |
839 selected_format = settings_dropdown(context, "Save State Format", formats, num_formats, selected_format, "ui\0state_format\0"); | 849 selected_format = settings_dropdown(context, "Save State Format", formats, num_formats, selected_format, "ui\0state_format\0"); |
840 selected_init = settings_dropdown(context, "Initial RAM Value", ram_inits, num_inits, selected_init, "system\0ram_init\0"); | 850 selected_init = settings_dropdown(context, "Initial RAM Value", ram_inits, num_inits, selected_init, "system\0ram_init\0"); |