mirror of
https://gitea.tendokyu.moe/Hay1tsme/segatools.git
synced 2026-05-17 17:13:42 -05:00
(Yeah, I know the OS may cache disk reads, but that wasn't the concern) The ALLS series of cabs runs EWF to prevent anything from being written to C:\. This PR adds another layer to iohook to redirect specific open/read/write/close operations to a virtual file table to prevent disk activity, and thus simulate the presence of EWF. This was mainly aimed at ALPB's billing files. Seriously, look at this - especially the timestamps, Sega wtf are you doing. This does not affect other path hooks. It's turned off by default and will throw an error if the current executable resides on C:\. Tested with FGO and APMv3. ![22bf755754[1].png](/attachments/31771aee-2e4d-4e4f-85e3-c5eec63c6f78) Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/84 Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
42 lines
1.0 KiB
C
42 lines
1.0 KiB
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include "ewf.h"
|
|
#include "platform/amvideo.h"
|
|
#include "platform/clock.h"
|
|
#include "platform/dns.h"
|
|
#include "platform/epay.h"
|
|
#include "platform/hwmon.h"
|
|
#include "platform/hwreset.h"
|
|
#include "platform/misc.h"
|
|
#include "platform/netenv.h"
|
|
#include "platform/nusec.h"
|
|
#include "platform/pcbid.h"
|
|
#include "platform/vfs.h"
|
|
#include "platform/system.h"
|
|
#include "platform/openssl.h"
|
|
|
|
struct platform_config {
|
|
struct amvideo_config amvideo;
|
|
struct clock_config clock;
|
|
struct dns_config dns;
|
|
struct epay_config epay;
|
|
struct hwmon_config hwmon;
|
|
struct hwreset_config hwreset;
|
|
struct misc_config misc;
|
|
struct pcbid_config pcbid;
|
|
struct netenv_config netenv;
|
|
struct nusec_config nusec;
|
|
struct vfs_config vfs;
|
|
struct system_config system;
|
|
struct openssl_config openssl;
|
|
struct ewf_config ewf;
|
|
};
|
|
|
|
HRESULT platform_hook_init(
|
|
const struct platform_config *cfg,
|
|
const char *game_id,
|
|
const char *platform_id,
|
|
HMODULE redir_mod);
|