mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-13 07:15:06 +00:00
cmake: Place Windows exclusive functionality into own file
This commit is contained in:
parent
9ddc9051c7
commit
2ab8949ba5
3 changed files with 26 additions and 12 deletions
|
@ -494,6 +494,7 @@ if(WIN32)
|
||||||
"cmake/version.rc.in"
|
"cmake/version.rc.in"
|
||||||
)
|
)
|
||||||
list(APPEND PROJECT_PRIVATE_SOURCE
|
list(APPEND PROJECT_PRIVATE_SOURCE
|
||||||
|
"source/windll.cpp"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -185,18 +185,6 @@ try {
|
||||||
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
LOG_ERROR("Unexpected exception in function '%s'.", __FUNCTION_NAME__);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
// Windows Only
|
|
||||||
extern "C" {
|
|
||||||
#include <Windows.h>
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::shared_ptr<util::threadpool> get_global_threadpool()
|
std::shared_ptr<util::threadpool> get_global_threadpool()
|
||||||
{
|
{
|
||||||
return global_threadpool;
|
return global_threadpool;
|
||||||
|
|
25
source/windll.cpp
Normal file
25
source/windll.cpp
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* Modern effects for a modern Streamer
|
||||||
|
* Copyright (C) 2020 Michael Fabian Dirks
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
Loading…
Reference in a new issue