UI: Only def. BROWSER_AVAILABLE for WIN32 (for now)
Currently, browser panel is only supported on windows. So rather than have to check for _WIN32 in the code everywhere, just move the WIN32 check to cmake, that way we don't have to have _WIN32 checks in the code everywhere the browser panel code is used, and do not have to remove a whole bunch of unnecessary _WIN32 #ifdefs for other operating systems when browser panel support is added for them.
This commit is contained in:
parent
c482f463e0
commit
4ba48484ae
@ -7,7 +7,7 @@ else()
|
||||
set(FIND_MODE QUIET)
|
||||
endif()
|
||||
|
||||
if(BROWSER_AVAILABLE_INTERNAL)
|
||||
if(BROWSER_AVAILABLE_INTERNAL AND WIN32)
|
||||
add_definitions(-DBROWSER_AVAILABLE)
|
||||
endif()
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
||||
using namespace json11;
|
||||
using namespace std;
|
||||
|
||||
#if defined(_WIN32) && defined(BROWSER_AVAILABLE)
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
#include <browser-panel.hpp>
|
||||
static CREATE_BROWSER_WIDGET_PROC create_browser_widget = nullptr;
|
||||
#endif
|
||||
@ -1530,7 +1530,7 @@ void OBSBasic::OBSInit()
|
||||
blog(LOG_INFO, "---------------------------------");
|
||||
obs_post_load_modules();
|
||||
|
||||
#if defined(_WIN32) && defined(BROWSER_AVAILABLE)
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
create_browser_widget = obs_browser_init_panel();
|
||||
#endif
|
||||
|
||||
@ -1761,7 +1761,7 @@ void OBSBasic::OnFirstLoad()
|
||||
if (api)
|
||||
api->on_event(OBS_FRONTEND_EVENT_FINISHED_LOADING);
|
||||
|
||||
#if defined(_WIN32) && defined(BROWSER_AVAILABLE)
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
/* Attempt to load init screen if available */
|
||||
if (create_browser_widget) {
|
||||
WhatsNewInfoThread *wnit = new WhatsNewInfoThread();
|
||||
|
Loading…
x
Reference in New Issue
Block a user