mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-30 10:37:05 +00:00
Fix main.cpp rendering loop and update CMakeLists.txt
This commit is contained in:
parent
0af6018a3f
commit
7e3a0d97d5
2 changed files with 15 additions and 12 deletions
|
|
@ -80,12 +80,18 @@ endforeach()
|
|||
|
||||
|
||||
|
||||
# Optimizations
|
||||
set_property(TARGET Pound PROPERTY CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
||||
if (WIN32)
|
||||
target_compile_options(Pound PRIVATE $<$<CONFIG:Release>:/Oi>)
|
||||
target_compile_options(Pound PRIVATE $<$<CONFIG:Release>:/Ot>)
|
||||
endif()
|
||||
# --------------------------------
|
||||
# ---- Optimizations / Flags -----
|
||||
# --------------------------------
|
||||
|
||||
# (optional) LTO/IPO in Release, nur wenn unterstützt
|
||||
set_property(TARGET Pound PROPERTY INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
||||
|
||||
# MSVC-spezifische Flags NUR bei MSVC setzen (nicht bei MinGW/GCC)
|
||||
target_compile_options(Pound PRIVATE
|
||||
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Release>>:/Oi /Ot>
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(Pound PRIVATE
|
||||
common
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
#if 0
|
||||
#if 1
|
||||
gui::window_t window = {.data = nullptr, .gl_context = nullptr};
|
||||
(void)gui::window_init(&window, "Pound Emulator", 640, 480);
|
||||
|
||||
|
|
@ -103,11 +103,8 @@ int main()
|
|||
::glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
::ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
if (bool sdl_ret_code = ::SDL_GL_SwapWindow(gui.window.data); false == sdl_ret_code)
|
||||
{
|
||||
LOG_ERROR("Failed to update window with OpenGL rendering: {}", SDL_GetError());
|
||||
is_running = false;
|
||||
}
|
||||
::SDL_GL_SwapWindow(gui.window.data);
|
||||
|
||||
|
||||
// Small delay to prevent excessive CPU usage
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue