forked from Dniel97/segatools
platform: Shift config structs around
This commit is contained in:
parent
a87b8f72fa
commit
8b8656c9d2
@ -2,6 +2,10 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
struct amvideo_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
HRESULT amvideo_hook_init(const struct amvideo_config *cfg, HMODULE redir_mod);
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "platform/clock.h"
|
||||
#include "platform/config.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
struct clock_config {
|
||||
bool timezone;
|
||||
bool timewarp;
|
||||
bool writeable;
|
||||
};
|
||||
|
||||
HRESULT clock_hook_init(const struct clock_config *cfg);
|
||||
|
@ -9,7 +9,17 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "platform/amvideo.h"
|
||||
#include "platform/clock.h"
|
||||
#include "platform/config.h"
|
||||
#include "platform/dns.h"
|
||||
#include "platform/hwmon.h"
|
||||
#include "platform/misc.h"
|
||||
#include "platform/netenv.h"
|
||||
#include "platform/nusec.h"
|
||||
#include "platform/pcbid.h"
|
||||
#include "platform/platform.h"
|
||||
#include "platform/vfs.h"
|
||||
|
||||
void platform_config_load(struct platform_config *cfg, const wchar_t *filename)
|
||||
{
|
||||
|
@ -6,73 +6,16 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct amvideo_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
struct clock_config {
|
||||
bool timezone;
|
||||
bool timewarp;
|
||||
bool writeable;
|
||||
};
|
||||
|
||||
struct dns_config {
|
||||
bool enable;
|
||||
wchar_t router[128];
|
||||
wchar_t startup[128];
|
||||
wchar_t billing[128];
|
||||
wchar_t aimedb[128];
|
||||
};
|
||||
|
||||
struct hwmon_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
struct misc_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
struct netenv_config {
|
||||
bool enable;
|
||||
uint8_t addr_suffix;
|
||||
uint8_t router_suffix;
|
||||
uint8_t mac_addr[6];
|
||||
};
|
||||
|
||||
struct nusec_config {
|
||||
bool enable;
|
||||
char keychip_id[16];
|
||||
char game_id[4];
|
||||
char platform_id[4];
|
||||
uint8_t region;
|
||||
uint8_t system_flag;
|
||||
uint32_t subnet;
|
||||
wchar_t billing_ca[MAX_PATH];
|
||||
wchar_t billing_pub[MAX_PATH];
|
||||
};
|
||||
|
||||
struct pcbid_config {
|
||||
bool enable;
|
||||
wchar_t serial_no[17];
|
||||
};
|
||||
|
||||
struct vfs_config {
|
||||
bool enable;
|
||||
wchar_t amfs[MAX_PATH];
|
||||
wchar_t appdata[MAX_PATH];
|
||||
};
|
||||
|
||||
struct platform_config {
|
||||
struct amvideo_config amvideo;
|
||||
struct clock_config clock;
|
||||
struct dns_config dns;
|
||||
struct hwmon_config hwmon;
|
||||
struct misc_config misc;
|
||||
struct pcbid_config pcbid;
|
||||
struct netenv_config netenv;
|
||||
struct nusec_config nusec;
|
||||
struct vfs_config vfs;
|
||||
};
|
||||
#include "platform/amvideo.h"
|
||||
#include "platform/clock.h"
|
||||
#include "platform/dns.h"
|
||||
#include "platform/hwmon.h"
|
||||
#include "platform/misc.h"
|
||||
#include "platform/netenv.h"
|
||||
#include "platform/nusec.h"
|
||||
#include "platform/pcbid.h"
|
||||
#include "platform/platform.h"
|
||||
#include "platform/vfs.h"
|
||||
|
||||
void platform_config_load(
|
||||
struct platform_config *cfg,
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "hooklib/dns.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/dns.h"
|
||||
|
||||
HRESULT dns_platform_hook_init(const struct dns_config *cfg)
|
||||
|
@ -2,7 +2,15 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct dns_config {
|
||||
bool enable;
|
||||
wchar_t router[128];
|
||||
wchar_t startup[128];
|
||||
wchar_t billing[128];
|
||||
wchar_t aimedb[128];
|
||||
};
|
||||
|
||||
HRESULT dns_platform_hook_init(const struct dns_config *cfg);
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "hook/iohook.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/hwmon.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
struct hwmon_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
HRESULT hwmon_hook_init(const struct hwmon_config *cfg);
|
||||
|
@ -1,5 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <windows.h>
|
||||
|
||||
struct misc_config {
|
||||
bool enable;
|
||||
};
|
||||
|
||||
HRESULT misc_hook_init(const struct misc_config *cfg, const char *platform_id);
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/netenv.h"
|
||||
#include "platform/nusec.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
||||
|
@ -5,7 +5,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/nusec.h"
|
||||
|
||||
struct netenv_config {
|
||||
bool enable;
|
||||
uint8_t addr_suffix;
|
||||
uint8_t router_suffix;
|
||||
uint8_t mac_addr[6];
|
||||
};
|
||||
|
||||
HRESULT netenv_hook_init(
|
||||
const struct netenv_config *cfg,
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include "hooklib/reg.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/nusec.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
@ -2,7 +2,21 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct nusec_config {
|
||||
bool enable;
|
||||
char keychip_id[16];
|
||||
char game_id[4];
|
||||
char platform_id[4];
|
||||
uint8_t region;
|
||||
uint8_t system_flag;
|
||||
uint32_t subnet;
|
||||
wchar_t billing_ca[MAX_PATH];
|
||||
wchar_t billing_pub[MAX_PATH];
|
||||
};
|
||||
|
||||
HRESULT nusec_hook_init(
|
||||
const struct nusec_config *cfg,
|
||||
|
@ -1,5 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <windows.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct pcbid_config {
|
||||
bool enable;
|
||||
wchar_t serial_no[17];
|
||||
};
|
||||
|
||||
HRESULT pcbid_hook_init(const struct pcbid_config *cfg);
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "platform/amvideo.h"
|
||||
#include "platform/clock.h"
|
||||
#include "platform/config.h"
|
||||
#include "platform/dns.h"
|
||||
#include "platform/hwmon.h"
|
||||
#include "platform/misc.h"
|
||||
|
@ -2,7 +2,27 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/amvideo.h"
|
||||
#include "platform/clock.h"
|
||||
#include "platform/dns.h"
|
||||
#include "platform/hwmon.h"
|
||||
#include "platform/misc.h"
|
||||
#include "platform/netenv.h"
|
||||
#include "platform/nusec.h"
|
||||
#include "platform/pcbid.h"
|
||||
#include "platform/vfs.h"
|
||||
|
||||
struct platform_config {
|
||||
struct amvideo_config amvideo;
|
||||
struct clock_config clock;
|
||||
struct dns_config dns;
|
||||
struct hwmon_config hwmon;
|
||||
struct misc_config misc;
|
||||
struct pcbid_config pcbid;
|
||||
struct netenv_config netenv;
|
||||
struct nusec_config nusec;
|
||||
struct vfs_config vfs;
|
||||
};
|
||||
|
||||
HRESULT platform_hook_init(
|
||||
const struct platform_config *cfg,
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "hooklib/path.h"
|
||||
#include "hooklib/reg.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/vfs.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
|
@ -2,6 +2,13 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "platform/config.h"
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
struct vfs_config {
|
||||
bool enable;
|
||||
wchar_t amfs[MAX_PATH];
|
||||
wchar_t appdata[MAX_PATH];
|
||||
};
|
||||
|
||||
HRESULT vfs_hook_init(const struct vfs_config *config);
|
||||
|
Loading…
Reference in New Issue
Block a user