Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ inline void init_apartment_sta() noexcept

#include "Application.hpp"

#include <score/gfx/DisplayConfig.hpp>
#include <score/widgets/MessageBox.hpp>

#include <ossia/detail/config.hpp>
Expand Down Expand Up @@ -854,6 +855,9 @@ int main(int argc, char** argv)
setup_limits();
setup_gpu();
setup_x11(argc, argv);
// After setup_x11: it is what decides whether this is an eglfs boot, and the
// platform reads its configuration once, when QGuiApplication starts.
score::gfx::applyDisplayConfig();
setup_gtk();
setup_suil();
setup_faust_path();
Expand Down Expand Up @@ -900,6 +904,13 @@ int main(int argc, char** argv)
if(failsafe)
app.appSettings.opengl = false;

// An appliance shows its render output, not an editor. The platform gives a
// screen to whichever window asks first and never takes it back, so the
// editor cannot simply be hidden: it must not be created. Ctrl+Alt+Shift+E
// writes the setting back and starts score again.
if(score::gfx::oneWindowPerScreen() && !score::gfx::editorUiRequested())
app.appSettings.gui = false;

#if defined(__linux__) && !(defined(__arm__) || defined(__aarch64__))
// On linux under offscreen, etc it crashes inside
// QOffscreenSurface::create
Expand Down
2 changes: 2 additions & 0 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ set(HEADERS
"${CMAKE_CURRENT_SOURCE_DIR}/score/document/ChangeId.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/document/DocumentContext.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/document/DocumentInterface.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/gfx/DisplayConfig.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/gfx/OpenGL.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/gfx/Vulkan.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/locking/ObjectLocker.hpp"
Expand Down Expand Up @@ -389,6 +390,7 @@ set(SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/score/tools/IdentifierGeneration.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/command/CommandDataSerialization.cpp"

"${CMAKE_CURRENT_SOURCE_DIR}/score/gfx/DisplayConfig.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/gfx/OpenGL.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/score/gfx/Vulkan.cpp"

Expand Down
Loading
Loading