mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 11:43:56 +00:00
Add support for user_object/user_handle_table
This commit is contained in:
@@ -509,6 +509,41 @@ namespace
|
||||
return true;
|
||||
}
|
||||
|
||||
bool test_monitor_info()
|
||||
{
|
||||
const POINT pt = {0, 0};
|
||||
const auto hMonitor = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
|
||||
if (!hMonitor)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
MONITORINFOEXA mi;
|
||||
mi.cbSize = sizeof(mi);
|
||||
|
||||
if (!GetMonitorInfoA(hMonitor, &mi))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (std::string_view(mi.szDevice) != R"(\\.\DISPLAY1)")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mi.rcMonitor.left != 0 || mi.rcMonitor.top != 0 || mi.rcMonitor.right != 1920 || mi.rcMonitor.bottom != 1080)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(mi.dwFlags & MONITORINFOF_PRIMARY))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool test_time_zone()
|
||||
{
|
||||
DYNAMIC_TIME_ZONE_INFORMATION current_dtzi = {};
|
||||
@@ -908,6 +943,7 @@ int main(const int argc, const char* argv[])
|
||||
RUN_TEST(test_working_directory, "Working Directory")
|
||||
RUN_TEST(test_registry, "Registry")
|
||||
RUN_TEST(test_system_info, "System Info")
|
||||
RUN_TEST(test_monitor_info, "Monitor Info")
|
||||
RUN_TEST(test_time_zone, "Time Zone")
|
||||
RUN_TEST(test_threads, "Threads")
|
||||
RUN_TEST(test_threads_winapi, "Threads WinAPI")
|
||||
|
||||
Reference in New Issue
Block a user