aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/platform/win/SystemImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdParty/efsw/platform/win/SystemImpl.cpp')
-rwxr-xr-xsrc/3rdParty/efsw/platform/win/SystemImpl.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/platform/win/SystemImpl.cpp b/src/3rdParty/efsw/platform/win/SystemImpl.cpp
new file mode 100755
index 0000000..d1f2b21
--- /dev/null
+++ b/src/3rdParty/efsw/platform/win/SystemImpl.cpp
@@ -0,0 +1,46 @@
1#include <efsw/String.hpp>
2#include <efsw/platform/win/SystemImpl.hpp>
3
4#if EFSW_PLATFORM == EFSW_PLATFORM_WIN32
5
6#ifndef WIN32_LEAN_AND_MEAN
7#define WIN32_LEAN_AND_MEAN
8#endif
9#include <cstdlib>
10#include <windows.h>
11
12namespace efsw { namespace Platform {
13
14void System::sleep( const unsigned long& ms ) {
15 ::Sleep( ms );
16}
17
18std::string System::getProcessPath() {
19 // Get path to executable:
20 WCHAR szDrive[_MAX_DRIVE];
21 WCHAR szDir[_MAX_DIR];
22 WCHAR szFilename[_MAX_DIR];
23 WCHAR szExt[_MAX_DIR];
24 std::wstring dllName( _MAX_DIR, 0 );
25
26 GetModuleFileNameW( 0, &dllName[0], _MAX_PATH );
27
28#ifdef EFSW_COMPILER_MSVC
29 _wsplitpath_s( dllName.c_str(), szDrive, _MAX_DRIVE, szDir, _MAX_DIR, szFilename, _MAX_DIR,
30 szExt, _MAX_DIR );
31#else
32 _wsplitpath( dllName.c_str(), szDrive, szDir, szFilename, szExt );
33#endif
34
35 return String( szDrive ).toUtf8() + String( szDir ).toUtf8();
36}
37
38void System::maxFD() {}
39
40Uint64 System::getMaxFD() { // Number of ReadDirectory per thread
41 return 60;
42}
43
44}} // namespace efsw::Platform
45
46#endif