force_enable_vsync fix

This commit is contained in:
floralrainfall 2023-07-16 01:57:42 -04:00
parent 8b7fdd1d83
commit b8a489a6ec
4 changed files with 9 additions and 4 deletions

View File

@ -13,6 +13,10 @@ if(COMPILE_PLAYER OR COMPILE_STUDIO)
add_subdirectory(Common)
if(FORCE_ENABLE_VSYNC)
target_compile_definitions(Common PUBLIC FORCE_ENABLE_VSYNC)
endif()
if(COMPILE_PLAYER)
add_subdirectory(Player)
endif()

View File

@ -119,6 +119,9 @@ namespace RNR
options["externalWindowHandle"] = getWindowHandle();
options["FSAA"] = "4";
#ifdef FORCE_ENABLE_VSYNC
options["vsync"] = "true";
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
options["macAPI"] = "cocoa";
options["macAPICocoaUseNSView"] = "true";

View File

@ -16,12 +16,9 @@ if(WIN32)
list(APPEND HEADER Resource/Windows/Script.rc)
endif()
if(FORCE_ENABLE_VSYNC)
target_compile_definitions(Studio PRIVATE FORCE_ENABLE_VSYNC)
endif()
qt_add_executable(Studio ${SOURCE} ${HEADER})
target_include_directories(Studio PRIVATE Header)
target_link_libraries(Studio PRIVATE Common Engine)

View File

@ -13,6 +13,7 @@ MainWindow::MainWindow()
ogreRoot = new Ogre::Root();
Ogre::ConfigDialog* config = OgreBites::getNativeConfigDialog();
ogreRoot->showConfigDialog(config);
ogreRoot->initialise(false);
menubar = new QMenuBar();