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
|
||||
|
||||
if show_menu_bar?
|
||||
if ImGui.main_menu_bar do
|
||||
ImGui.menu "File" do
|
||||
open_rom_selection = ImGui.menu_item "Open ROM"
|
||||
open_bios_selection = ImGui.menu_item "Select BIOS" unless stubbed?
|
||||
ImGui.menu "Recent", @config.recents.size > 0 do
|
||||
@config.recents.each do |recent|
|
||||
load_new_rom(recent) if ImGui.menu_item recent
|
||||
end
|
||||
ImGui.separator
|
||||
if ImGui.menu_item "Clear"
|
||||
@config.recents.clear
|
||||
@config.commit
|
||||
end
|
||||
end
|
||||
ImGui.separator
|
||||
open_keybindings = ImGui.menu_item "Keybindings"
|
||||
ImGui.separator
|
||||
exit if ImGui.menu_item "Exit", "Ctrl+Q"
|
||||
end
|
||||
ImGui.main_menu_bar do
|
||||
ImGui.menu "File" do
|
||||
open_rom_selection = ImGui.menu_item "Open ROM"
|
||||
open_bios_selection = ImGui.menu_item "Select BIOS" unless stubbed?
|
||||
ImGui.menu "Recent", @config.recents.size > 0 do
|
||||
@config.recents.each do |recent|
|
||||
load_new_rom(recent) if ImGui.menu_item recent
|
||||
end
|
||||
ImGui.separator
|
||||
if ImGui.menu_item "Clear"
|
||||
@config.recents.clear
|
||||
@config.commit
|
||||
end
|
||||
end
|
||||
ImGui.separator
|
||||
open_keybindings = ImGui.menu_item "Keybindings"
|
||||
ImGui.separator
|
||||
exit if ImGui.menu_item "Exit", "Ctrl+Q"
|
||||
end
|
||||
|
||||
ImGui.menu "Emulation" do
|
||||
pause = @pause
|
||||
ImGui.menu "Emulation" do
|
||||
pause = @pause
|
||||
|
||||
ImGui.menu_item "Pause", "Ctrl+P", pointerof(pause)
|
||||
@controller.toggle_sync if ImGui.menu_item "Audio Sync", "Tab", @controller.sync?, !stubbed?
|
||||
ImGui.menu_item "Pause", "Ctrl+P", pointerof(pause)
|
||||
@controller.toggle_sync if ImGui.menu_item "Audio Sync", "Tab", @controller.sync?, !stubbed?
|
||||
|
||||
pause(pause)
|
||||
end
|
||||
pause(pause)
|
||||
end
|
||||
|
||||
ImGui.menu "Audio/Video" do
|
||||
ImGui.menu "Frame size" do
|
||||
(1..8).each do |scale|
|
||||
if ImGui.menu_item "#{scale}x", selected: scale == @scale
|
||||
@scale = scale
|
||||
LibSDL.set_window_size(@window, @controller.window_width * @scale, @controller.window_height * @scale)
|
||||
end
|
||||
end
|
||||
ImGui.separator
|
||||
@window.fullscreen = @fullscreen if ImGui.menu_item "Fullscreen", "Ctrl+F", pointerof(@fullscreen)
|
||||
end
|
||||
end
|
||||
ImGui.menu "Audio/Video" do
|
||||
ImGui.menu "Frame size" do
|
||||
(1..8).each do |scale|
|
||||
if ImGui.menu_item "#{scale}x", selected: scale == @scale
|
||||
@scale = scale
|
||||
LibSDL.set_window_size(@window, @controller.window_width * @scale, @controller.window_height * @scale)
|
||||
end
|
||||
end
|
||||
ImGui.separator
|
||||
@window.fullscreen = @fullscreen if ImGui.menu_item "Fullscreen", "Ctrl+F", pointerof(@fullscreen)
|
||||
end
|
||||
end
|
||||
|
||||
ImGui.menu "Debug" do
|
||||
ImGui.menu_item "Overlay", "", pointerof(@enable_overlay)
|
||||
ImGui.separator
|
||||
@controller.render_debug_items
|
||||
end
|
||||
ImGui.menu "Debug" do
|
||||
ImGui.menu_item "Overlay", "", pointerof(@enable_overlay)
|
||||
ImGui.separator
|
||||
@controller.render_debug_items
|
||||
end
|
||||
|
||||
overlay_height += ImGui.get_window_size.y
|
||||
end
|
||||
overlay_height += ImGui.get_window_size.y
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue