mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22:29:15 +01:00
[util] Add win32 compat header
Header of misc. stubs and re-implementations.
This commit is contained in:
parent
ad386305ff
commit
ba8868be24
59
src/util/util_win32_compat.h
Normal file
59
src/util/util_win32_compat.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
#include "log/log.h"
|
||||||
|
|
||||||
|
inline HMODULE LoadLibraryA(LPCSTR lpLibFileName) {
|
||||||
|
return dlopen(lpLibFileName, RTLD_NOW);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void CloseLibrary(HMODULE module) {
|
||||||
|
dlclose(module);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void* GetProcAddress(HMODULE module, LPCSTR lpProcName) {
|
||||||
|
return dlsym(module, lpProcName);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline HANDLE CreateSemaphoreA(
|
||||||
|
SECURITY_ATTRIBUTES* lpSemaphoreAttributes,
|
||||||
|
LONG lInitialCount,
|
||||||
|
LONG lMaximumCount,
|
||||||
|
LPCSTR lpName) {
|
||||||
|
dxvk::Logger::warn("CreateSemaphoreA not implemented.");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
#define CreateSemaphore CreateSemaphoreA
|
||||||
|
|
||||||
|
inline BOOL ReleaseSemaphore(
|
||||||
|
HANDLE hSemaphore,
|
||||||
|
LONG lReleaseCount,
|
||||||
|
LONG* lpPreviousCount) {
|
||||||
|
dxvk::Logger::warn("ReleaseSemaphore not implemented.");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline BOOL SetEvent(HANDLE hEvent) {
|
||||||
|
dxvk::Logger::warn("SetEvent not implemented.");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline BOOL CloseHandle(HANDLE hObject) {
|
||||||
|
dxvk::Logger::warn("CloseHandle not implemented.");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline HDC CreateCompatibleDC(HDC hdc) {
|
||||||
|
dxvk::Logger::warn("CreateCompatibleDC not implemented.");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline BOOL DeleteDC(HDC hdc) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user