fix(tray): fix compiling without system tray enabled (#5284)
This commit is contained in:
@@ -125,8 +125,6 @@ if(NOT SUNSHINE_ASSETS_DIR_DEF)
|
||||
endif()
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_ASSETS_DIR="${SUNSHINE_ASSETS_DIR_DEF}")
|
||||
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
|
||||
|
||||
# Publisher metadata
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_NAME="${SUNSHINE_PUBLISHER_NAME}")
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_PUBLISHER_WEBSITE="${SUNSHINE_PUBLISHER_WEBSITE}")
|
||||
@@ -166,3 +164,4 @@ else()
|
||||
set(SUNSHINE_TRAY 0)
|
||||
message(STATUS "Tray icon disabled")
|
||||
endif()
|
||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY=${SUNSHINE_TRAY})
|
||||
|
||||
@@ -116,7 +116,9 @@ void mainThreadLoop(const std::shared_ptr<safe::event_t<bool>> &shutdown_event)
|
||||
|
||||
// Main thread event loop
|
||||
BOOST_LOG(info) << "Starting main loop"sv;
|
||||
#if defined SUNSHINE_TRAY && SUNSHINE_TRAY >= 1
|
||||
while (system_tray::process_tray_events() == 0);
|
||||
#endif
|
||||
BOOST_LOG(info) << "Main loop has exited"sv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user