mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2025-01-31 20:15:20 +01:00
feat(iidx 20-26): Hook new "HD era scaling" module
Replace the old module, re-use the configuration for now to avoid introducing breaking changes in the configuration API. This can be further cleaned up, once the monolithic iidxhook-util/d3d9 module is further broken up.
This commit is contained in:
parent
782a23db74
commit
9c9e554234
@ -7,6 +7,7 @@ deplibs_iidxhook6 := \
|
||||
avs \
|
||||
|
||||
libs_iidxhook6 := \
|
||||
iidxhook-d3d9 \
|
||||
iidxhook-util \
|
||||
ezusb-emu \
|
||||
ezusb-iidx-16seg-emu \
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "hooklib/rs232.h"
|
||||
#include "hooklib/setupapi.h"
|
||||
|
||||
#include "iidxhook-d3d9/bb-scale-hd.h"
|
||||
|
||||
#include "iidxhook-util/acio.h"
|
||||
#include "iidxhook-util/config-gfx.h"
|
||||
#include "iidxhook-util/config-io.h"
|
||||
@ -44,6 +46,7 @@
|
||||
"Usage: launcher.exe -K iidxhook6.dll <bm2dx.dll> [options...]"
|
||||
|
||||
static const hook_d3d9_irp_handler_t iidxhook_d3d9_handlers[] = {
|
||||
iidxhook_d3d9_bb_scale_hd_d3d9_irp_handler,
|
||||
iidxhook_util_d3d9_irp_handler,
|
||||
};
|
||||
|
||||
@ -63,14 +66,20 @@ iidxhook6_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
|
||||
d3d9_config.framerate_limit = config_gfx->frame_rate_limit;
|
||||
d3d9_config.pci_vid = config_gfx->pci_id_vid;
|
||||
d3d9_config.pci_pid = config_gfx->pci_id_pid;
|
||||
d3d9_config.scale_back_buffer_width = config_gfx->scale_back_buffer_width;
|
||||
d3d9_config.scale_back_buffer_height = config_gfx->scale_back_buffer_height;
|
||||
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
|
||||
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
|
||||
d3d9_config.device_adapter = config_gfx->device_adapter;
|
||||
|
||||
iidxhook_util_d3d9_configure(&d3d9_config);
|
||||
|
||||
// The "old"/current scaling feature does not work with 20-26 because
|
||||
// the render engine changed and provides its own built-in scaling feature
|
||||
if (config_gfx->scale_back_buffer_width > 0 &&
|
||||
config_gfx->scale_back_buffer_height > 0) {
|
||||
iidxhook_d3d9_bb_scale_hd_init(
|
||||
config_gfx->scale_back_buffer_width,
|
||||
config_gfx->scale_back_buffer_height);
|
||||
}
|
||||
|
||||
hook_d3d9_init(iidxhook_d3d9_handlers, lengthof(iidxhook_d3d9_handlers));
|
||||
}
|
||||
|
||||
|
@ -2,11 +2,13 @@ avsdlls += iidxhook7
|
||||
|
||||
ldflags_iidxhook7 := \
|
||||
-liphlpapi \
|
||||
-ld3d9 \
|
||||
|
||||
deplibs_iidxhook7 := \
|
||||
avs \
|
||||
|
||||
libs_iidxhook7 := \
|
||||
iidxhook-d3d9 \
|
||||
iidxhook-util \
|
||||
cconfig \
|
||||
ezusb-emu \
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "hooklib/rs232.h"
|
||||
#include "hooklib/setupapi.h"
|
||||
|
||||
#include "iidxhook-d3d9/bb-scale-hd.h"
|
||||
|
||||
#include "iidxhook-util/acio.h"
|
||||
#include "iidxhook-util/config-gfx.h"
|
||||
#include "iidxhook-util/config-io.h"
|
||||
@ -44,6 +46,7 @@
|
||||
"Usage: launcher.exe -K iidxhook7.dll <bm2dx.dll> [options...]"
|
||||
|
||||
static const hook_d3d9_irp_handler_t iidxhook_d3d9_handlers[] = {
|
||||
iidxhook_d3d9_bb_scale_hd_d3d9_irp_handler,
|
||||
iidxhook_util_d3d9_irp_handler,
|
||||
};
|
||||
|
||||
@ -63,14 +66,20 @@ iidxhook7_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
|
||||
d3d9_config.framerate_limit = config_gfx->frame_rate_limit;
|
||||
d3d9_config.pci_vid = config_gfx->pci_id_vid;
|
||||
d3d9_config.pci_pid = config_gfx->pci_id_pid;
|
||||
d3d9_config.scale_back_buffer_width = config_gfx->scale_back_buffer_width;
|
||||
d3d9_config.scale_back_buffer_height = config_gfx->scale_back_buffer_height;
|
||||
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
|
||||
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
|
||||
d3d9_config.device_adapter = config_gfx->device_adapter;
|
||||
|
||||
iidxhook_util_d3d9_configure(&d3d9_config);
|
||||
|
||||
// The "old"/current scaling feature does not work with 20-26 because
|
||||
// the render engine changed and provides its own built-in scaling feature
|
||||
if (config_gfx->scale_back_buffer_width > 0 &&
|
||||
config_gfx->scale_back_buffer_height > 0) {
|
||||
iidxhook_d3d9_bb_scale_hd_init(
|
||||
config_gfx->scale_back_buffer_width,
|
||||
config_gfx->scale_back_buffer_height);
|
||||
}
|
||||
|
||||
hook_d3d9_init(iidxhook_d3d9_handlers, lengthof(iidxhook_d3d9_handlers));
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ deplibs_iidxhook8 := \
|
||||
avs \
|
||||
|
||||
libs_iidxhook8 := \
|
||||
iidxhook-d3d9 \
|
||||
iidxhook-util \
|
||||
acioemu \
|
||||
bio2emu \
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include "hooklib/rs232.h"
|
||||
#include "hooklib/setupapi.h"
|
||||
|
||||
#include "iidxhook-d3d9/bb-scale-hd.h"
|
||||
|
||||
#include "iidxhook-util/acio.h"
|
||||
#include "iidxhook-util/config-gfx.h"
|
||||
#include "iidxhook-util/d3d9.h"
|
||||
@ -43,6 +45,7 @@
|
||||
"Usage: launcher.exe -K iidxhook8.dll <bm2dx.dll> [options...]"
|
||||
|
||||
static const hook_d3d9_irp_handler_t iidxhook_d3d9_handlers[] = {
|
||||
iidxhook_d3d9_bb_scale_hd_d3d9_irp_handler,
|
||||
iidxhook_util_d3d9_irp_handler,
|
||||
};
|
||||
|
||||
@ -60,14 +63,20 @@ iidxhook8_setup_d3d9_hooks(const struct iidxhook_config_gfx *config_gfx)
|
||||
d3d9_config.framerate_limit = config_gfx->frame_rate_limit;
|
||||
d3d9_config.pci_vid = config_gfx->pci_id_vid;
|
||||
d3d9_config.pci_pid = config_gfx->pci_id_pid;
|
||||
d3d9_config.scale_back_buffer_width = config_gfx->scale_back_buffer_width;
|
||||
d3d9_config.scale_back_buffer_height = config_gfx->scale_back_buffer_height;
|
||||
d3d9_config.scale_back_buffer_filter = config_gfx->scale_back_buffer_filter;
|
||||
d3d9_config.forced_refresh_rate = config_gfx->forced_refresh_rate;
|
||||
d3d9_config.device_adapter = config_gfx->device_adapter;
|
||||
|
||||
iidxhook_util_d3d9_configure(&d3d9_config);
|
||||
|
||||
// The "old"/current scaling feature does not work with 20-26 because
|
||||
// the render engine changed and provides its own built-in scaling feature
|
||||
if (config_gfx->scale_back_buffer_width > 0 &&
|
||||
config_gfx->scale_back_buffer_height > 0) {
|
||||
iidxhook_d3d9_bb_scale_hd_init(
|
||||
config_gfx->scale_back_buffer_width,
|
||||
config_gfx->scale_back_buffer_height);
|
||||
}
|
||||
|
||||
hook_d3d9_init(iidxhook_d3d9_handlers, lengthof(iidxhook_d3d9_handlers));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user