mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-21 04:55:56 +00:00
Default shadow storage to on when running under Wine
This commit is contained in:
1 parent
f469c5a774
commit
d9d6264bb2
4 files changed
+10
-2
No files matched your search
@@ -1247,6 +1247,8 @@ int plat_os_version(char *out, size_t cap) {
|
||||
return snprintf(out, cap, "%s (Linux %s)", name, u.release) < (int)cap;
|
||||
}
|
||||
|
||||
int plat_is_wine(void) { return 0; }
|
||||
|
||||
int plat_stderr_path(char *out, size_t cap) {
|
||||
struct stat st;
|
||||
if (fstat(2, &st) || !S_ISREG(st.st_mode)) return 0;
|
||||
|
||||
@@ -350,6 +350,7 @@ uint32_t plat_thread_id(void); // id of the calling t
|
||||
int plat_font_path(const char *lang, char *out, size_t cap);
|
||||
// The operating system and its build ("Windows 10.0.28000") into out; 0 when unknown.
|
||||
int plat_os_version(char *out, size_t cap);
|
||||
int plat_is_wine(void); // 1 when the Windows build runs under Wine; 0 elsewhere
|
||||
// The file the process's stderr (the log) goes to, as a UTF-8 path; 0 when stderr is not a file (a console, a pipe).
|
||||
int plat_stderr_path(char *out, size_t cap);
|
||||
|
||||
|
||||
@@ -1128,6 +1128,11 @@ int plat_os_version(char *out, size_t cap) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int plat_is_wine(void) {
|
||||
HMODULE nt = GetModuleHandleW(L"ntdll.dll");
|
||||
return nt && GetProcAddress(nt, "wine_get_version") != NULL;
|
||||
}
|
||||
|
||||
int plat_stderr_path(char *out, size_t cap) {
|
||||
HANDLE h = GetStdHandle(STD_ERROR_HANDLE);
|
||||
wchar_t w[WPATH];
|
||||
|
||||
Reference in new issue
Block a user