mirror of
https://github.com/mattrberry/crab.git
synced 2025-02-04 08:46:04 +01:00
remove erroneous conditional block
This commit is contained in:
parent
5383a1b57b
commit
5e9720f9b0
1 changed files with 43 additions and 44 deletions
|
@ -210,56 +210,55 @@ class SDLOpenGLImGuiFrontend < Frontend
|
||||||
open_keybindings = false
|
open_keybindings = false
|
||||||
|
|
||||||
if show_menu_bar?
|
if show_menu_bar?
|
||||||
if ImGui.main_menu_bar do
|
ImGui.main_menu_bar do
|
||||||
ImGui.menu "File" do
|
ImGui.menu "File" do
|
||||||
open_rom_selection = ImGui.menu_item "Open ROM"
|
open_rom_selection = ImGui.menu_item "Open ROM"
|
||||||
open_bios_selection = ImGui.menu_item "Select BIOS" unless stubbed?
|
open_bios_selection = ImGui.menu_item "Select BIOS" unless stubbed?
|
||||||
ImGui.menu "Recent", @config.recents.size > 0 do
|
ImGui.menu "Recent", @config.recents.size > 0 do
|
||||||
@config.recents.each do |recent|
|
@config.recents.each do |recent|
|
||||||
load_new_rom(recent) if ImGui.menu_item recent
|
load_new_rom(recent) if ImGui.menu_item recent
|
||||||
end
|
end
|
||||||
ImGui.separator
|
ImGui.separator
|
||||||
if ImGui.menu_item "Clear"
|
if ImGui.menu_item "Clear"
|
||||||
@config.recents.clear
|
@config.recents.clear
|
||||||
@config.commit
|
@config.commit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ImGui.separator
|
ImGui.separator
|
||||||
open_keybindings = ImGui.menu_item "Keybindings"
|
open_keybindings = ImGui.menu_item "Keybindings"
|
||||||
ImGui.separator
|
ImGui.separator
|
||||||
exit if ImGui.menu_item "Exit", "Ctrl+Q"
|
exit if ImGui.menu_item "Exit", "Ctrl+Q"
|
||||||
end
|
end
|
||||||
|
|
||||||
ImGui.menu "Emulation" do
|
ImGui.menu "Emulation" do
|
||||||
pause = @pause
|
pause = @pause
|
||||||
|
|
||||||
ImGui.menu_item "Pause", "Ctrl+P", pointerof(pause)
|
ImGui.menu_item "Pause", "Ctrl+P", pointerof(pause)
|
||||||
@controller.toggle_sync if ImGui.menu_item "Audio Sync", "Tab", @controller.sync?, !stubbed?
|
@controller.toggle_sync if ImGui.menu_item "Audio Sync", "Tab", @controller.sync?, !stubbed?
|
||||||
|
|
||||||
pause(pause)
|
pause(pause)
|
||||||
end
|
end
|
||||||
|
|
||||||
ImGui.menu "Audio/Video" do
|
ImGui.menu "Audio/Video" do
|
||||||
ImGui.menu "Frame size" do
|
ImGui.menu "Frame size" do
|
||||||
(1..8).each do |scale|
|
(1..8).each do |scale|
|
||||||
if ImGui.menu_item "#{scale}x", selected: scale == @scale
|
if ImGui.menu_item "#{scale}x", selected: scale == @scale
|
||||||
@scale = scale
|
@scale = scale
|
||||||
LibSDL.set_window_size(@window, @controller.window_width * @scale, @controller.window_height * @scale)
|
LibSDL.set_window_size(@window, @controller.window_width * @scale, @controller.window_height * @scale)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ImGui.separator
|
ImGui.separator
|
||||||
@window.fullscreen = @fullscreen if ImGui.menu_item "Fullscreen", "Ctrl+F", pointerof(@fullscreen)
|
@window.fullscreen = @fullscreen if ImGui.menu_item "Fullscreen", "Ctrl+F", pointerof(@fullscreen)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ImGui.menu "Debug" do
|
ImGui.menu "Debug" do
|
||||||
ImGui.menu_item "Overlay", "", pointerof(@enable_overlay)
|
ImGui.menu_item "Overlay", "", pointerof(@enable_overlay)
|
||||||
ImGui.separator
|
ImGui.separator
|
||||||
@controller.render_debug_items
|
@controller.render_debug_items
|
||||||
end
|
end
|
||||||
|
|
||||||
overlay_height += ImGui.get_window_size.y
|
overlay_height += ImGui.get_window_size.y
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue