troubleshooter: address common issues in iidx and popn (#396)

## Description of change
iidx: 9on12 crashes iidx31+

popn: special message for createdevice failures (resolution issue)

## Testing
manually test both cases
This commit is contained in:
bicarus-dev
2025-10-04 15:21:33 -07:00
committed by GitHub
parent 8e2985d8d0
commit 8cc00c371a
2 changed files with 36 additions and 10 deletions
+8
View File
@@ -405,6 +405,14 @@ namespace games::iidx {
// init cfgmgr32 hooks // init cfgmgr32 hooks
cfgmgr32hook_init(avs::game::DLL_INSTANCE); cfgmgr32hook_init(avs::game::DLL_INSTANCE);
// report common errors on iidx31 and above
if (avs::game::is_ext(2023091500, MAXINT) && GRAPHICS_9_ON_12_STATE == DX9ON12_FORCE_ON) {
deferredlogs::defer_error_messages({
"common incompatibility with DX 9on12 + IIDX 31 and above",
" IIDX31+ is known to be incompatible with DX 9on12, leading to blank screen or crashes"
});
}
} }
void IIDXGame::pre_attach() { void IIDXGame::pre_attach() {
@@ -206,6 +206,22 @@ static std::string presentation_interval2s(UINT presentation_interval) {
static void update_backbuffer_dimensions(D3DPRESENT_PARAMETERS *params); static void update_backbuffer_dimensions(D3DPRESENT_PARAMETERS *params);
static void log_create_device_failure(HRESULT hresult) { static void log_create_device_failure(HRESULT hresult) {
// only print once since some games will try CreateDevice multiple times on failure
static std::once_flag printed;
std::call_once(printed, [hresult]() {
// special case for popn
if (avs::game::is_model("M39")) {
deferredlogs::defer_error_messages({
fmt::format("D3D9 CreateDevice/CreateDeviceEx failed with {:#x}!", (UINT)hresult),
" possible popn music HD mode resolution issue",
" popn HD mode launches at 1360x768 (and NOT 1366x768) which is often",
" unsupported by many monitors; here are some possible workarounds:",
" * enable GPU resolution scaling in your GPU settings",
" * use Force Full Screen Resolution option, combined with image scaling (F11)",
" * run in windowed mode",
" * run in SD mode"
});
} else {
deferredlogs::defer_error_messages({ deferredlogs::defer_error_messages({
fmt::format("D3D9 CreateDevice/CreateDeviceEx failed with {:#x}!", (UINT)hresult), fmt::format("D3D9 CreateDevice/CreateDeviceEx failed with {:#x}!", (UINT)hresult),
" this is a common graphics / monitor issue", " this is a common graphics / monitor issue",
@@ -218,6 +234,8 @@ static void log_create_device_failure(HRESULT hresult) {
" * failing all that, see if enabling windowed mode helps" " * failing all that, see if enabling windowed mode helps"
}); });
} }
});
}
static bool is_dx9_on_12_enabled() { static bool is_dx9_on_12_enabled() {
switch (GRAPHICS_9_ON_12_STATE) { switch (GRAPHICS_9_ON_12_STATE) {