[ROSAUTOTEST][SDK] ROS detection for apitests (#7613)

This commit is contained in:
Whindmar Saksit 2025-04-02 15:17:18 +02:00 committed by GitHub
parent 4965d6a8ac
commit 32fad87a08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -6,6 +6,7 @@
*/
#include "precomp.h"
#include <versionhelpers.h>
#define CONFIGURATION_FILENAMEA "rosautotest.ini"
#define CONFIGURATION_FILENAMEW L"rosautotest.ini"
@ -32,6 +33,7 @@ CConfiguration::CConfiguration()
FATAL("GetWindowsDirectoryW failed\n");
m_IsReactOS = !_wcsnicmp(&WindowsDirectory[3], L"reactos", 7);
m_IsReactOS = m_IsReactOS || IsReactOS();
if(GetEnvironmentVariableW(L"WINETEST_INTERACTIVE", Interactive, _countof(Interactive)))
m_IsInteractive = _wtoi(Interactive);

View file

@ -145,12 +145,10 @@ IsActiveSessionCountLimited()
}
#ifdef __REACTOS__
#include <mmtypes.h>
VERSIONHELPERAPI
IsReactOS()
{
// FIXME: Find a better method!
WCHAR szWinDir[MAX_PATH];
GetWindowsDirectoryW(szWinDir, _countof(szWinDir));
return (wcsstr(szWinDir, L"ReactOS") != NULL);
return *(UINT*)(MM_SHARED_USER_DATA_VA + PAGE_SIZE - sizeof(ULONG)) == 0x8EAC705;
}
#endif // __REACTOS__