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,16 +206,34 @@ 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) {
deferredlogs::defer_error_messages({ // only print once since some games will try CreateDevice multiple times on failure
fmt::format("D3D9 CreateDevice/CreateDeviceEx failed with {:#x}!", (UINT)hresult), static std::once_flag printed;
" this is a common graphics / monitor issue", std::call_once(printed, [hresult]() {
" * double check any graphics options you configured in spicecfg", // special case for popn
" * double check that your monitor supports the resolution + refresh rate", if (avs::game::is_model("M39")) {
" combination that the game requires", deferredlogs::defer_error_messages({
" * enable GPU-side resolution scaling in your GPU options as needed", fmt::format("D3D9 CreateDevice/CreateDeviceEx failed with {:#x}!", (UINT)hresult),
" * if you have three or more monitors, try unplugging them down to one or two,", " possible popn music HD mode resolution issue",
" or enable -graphics-force-single-adapter option", " popn HD mode launches at 1360x768 (and NOT 1366x768) which is often",
" * failing all that, see if enabling windowed mode helps" " 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({
fmt::format("D3D9 CreateDevice/CreateDeviceEx failed with {:#x}!", (UINT)hresult),
" this is a common graphics / monitor issue",
" * double check any graphics options you configured in spicecfg",
" * double check that your monitor supports the resolution + refresh rate",
" combination that the game requires",
" * enable GPU-side resolution scaling in your GPU options as needed",
" * if you have three or more monitors, try unplugging them down to one or two,",
" or enable -graphics-force-single-adapter option",
" * failing all that, see if enabling windowed mode helps"
});
}
}); });
} }