refact(iidxhook9): Use sdk-hook and support new config api
Summary: Test Plan:
This commit is contained in:
@@ -267,3 +267,22 @@ void d3d9exhook_config_gfx_get(
|
||||
D3D9EXHOOK_CONFIG_GFX_DEFAULT_FORCE_SCREEN_RES_HEIGHT_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
void d3d9exhook_config_gfx_get2(
|
||||
const bt_core_config_t *config,
|
||||
struct d3d9exhook_config_gfx *config_gfx)
|
||||
{
|
||||
bt_core_config_s32_get(config, "gfx/device/adapter", &config_gfx->device_adapter);
|
||||
bt_core_config_s32_get(config, "gfx/device/forced_refresh_rate", &config_gfx->forced_refresh_rate);
|
||||
bt_core_config_s32_get(config, "gfx/device/force_orientation", &config_gfx->force_orientation);
|
||||
bt_core_config_s32_get(config, "gfx/device/force_screen_res/width", &config_gfx->force_screen_res.width);
|
||||
bt_core_config_s32_get(config, "gfx/device/force_screen_res/height", &config_gfx->force_screen_res.height);
|
||||
|
||||
bt_core_config_bool_get(config, "gfx/window/windowed", &config_gfx->windowed);
|
||||
bt_core_config_bool_get(config, "gfx/window/framed", &config_gfx->framed);
|
||||
bt_core_config_bool_get(config, "gfx/window/confined", &config_gfx->confined);
|
||||
bt_core_config_s32_get(config, "gfx/window/width", &config_gfx->window_width);
|
||||
bt_core_config_s32_get(config, "gfx/window/height", &config_gfx->window_height);
|
||||
bt_core_config_s32_get(config, "gfx/window/x", &config_gfx->window_x);
|
||||
bt_core_config_s32_get(config, "gfx/window/y", &config_gfx->window_y);
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "cconfig/cconfig.h"
|
||||
|
||||
#include "iface-core/config.h"
|
||||
|
||||
/**
|
||||
* Config struct for d3d9exhook
|
||||
*
|
||||
@@ -38,4 +40,8 @@ void d3d9exhook_config_gfx_init(struct cconfig *config);
|
||||
void d3d9exhook_config_gfx_get(
|
||||
struct d3d9exhook_config_gfx *config_gfx, struct cconfig *config);
|
||||
|
||||
void d3d9exhook_config_gfx_get2(
|
||||
const bt_core_config_t *config,
|
||||
struct d3d9exhook_config_gfx *config_gfx);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user