mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-28 17:53:03 +02:00
Windows is absolutely literally satan
This commit is contained in:
parent
f232a4ec9d
commit
1dc86713e7
3 changed files with 4 additions and 10 deletions
|
@ -8,8 +8,8 @@ host_system = host_machine.system()
|
||||||
|
|
||||||
compilers = {'cpp': meson.get_compiler('cpp'), 'objc': meson.get_compiler('objc'), 'objcpp': meson.get_compiler('objcpp')}
|
compilers = {'cpp': meson.get_compiler('cpp'), 'objc': meson.get_compiler('objc'), 'objcpp': meson.get_compiler('objcpp')}
|
||||||
|
|
||||||
if compilers['objc'].get_id() != 'clang'
|
if compilers['objc'].get_id() != 'clang' or compilers['objcpp'].get_id() != 'clang'
|
||||||
error('This program must be built with Clang! ( try: OBJC=clang CXX=clang++ OBJCXX=clang++ meson build )')
|
error('This program must be built with Clang! ( try: OBJC=clang OBJCXX=clang++ meson build )')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
global_sources = []
|
global_sources = []
|
||||||
|
|
|
@ -2,8 +2,8 @@ This is a modified version of Steamshim used in [OneShot](https://github.com/eli
|
||||||
which should be compatible with Windows, further modified (not by much, at the moment) for mkxp-z.
|
which should be compatible with Windows, further modified (not by much, at the moment) for mkxp-z.
|
||||||
|
|
||||||
The key word, at the moment, is *"should"*. While it works fine on Unix, I found the Win32 code to be
|
The key word, at the moment, is *"should"*. While it works fine on Unix, I found the Win32 code to be
|
||||||
basically completely nonfunctional, and after some changes it will form the pipes just fine but will
|
basically completely nonfunctional. After some changes it will form the pipes and spawn the process
|
||||||
crash when the callback from requesting stats is called.
|
just fine, but steam_api will raise a memory access violation once it calls the shim's callbacks.
|
||||||
|
|
||||||
|
|
||||||
## Original Steamshim README:
|
## Original Steamshim README:
|
||||||
|
|
|
@ -439,16 +439,13 @@ SteamBridge::SteamBridge(PipeType _fd)
|
||||||
: m_CallbackUserStatsReceived(this, &SteamBridge::OnUserStatsReceived),
|
: m_CallbackUserStatsReceived(this, &SteamBridge::OnUserStatsReceived),
|
||||||
m_CallbackUserStatsStored(this, &SteamBridge::OnUserStatsStored),
|
m_CallbackUserStatsStored(this, &SteamBridge::OnUserStatsStored),
|
||||||
fd(_fd) {} // SteamBridge::SteamBridge
|
fd(_fd) {} // SteamBridge::SteamBridge
|
||||||
|
|
||||||
void SteamBridge::OnUserStatsReceived(UserStatsReceived_t *pCallback) {
|
void SteamBridge::OnUserStatsReceived(UserStatsReceived_t *pCallback) {
|
||||||
if (GAppID != pCallback->m_nGameID) {
|
if (GAppID != pCallback->m_nGameID) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifndef _WIN32 // FIXME
|
|
||||||
if (GUserID != pCallback->m_steamIDUser.ConvertToUint64()) {
|
if (GUserID != pCallback->m_steamIDUser.ConvertToUint64()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
writeStatsReceived(fd, pCallback->m_eResult == k_EResultOK);
|
writeStatsReceived(fd, pCallback->m_eResult == k_EResultOK);
|
||||||
} // SteamBridge::OnUserStatsReceived
|
} // SteamBridge::OnUserStatsReceived
|
||||||
|
|
||||||
|
@ -457,7 +454,6 @@ void SteamBridge::OnUserStatsStored(UserStatsStored_t *pCallback) {
|
||||||
return;
|
return;
|
||||||
writeStatsStored(fd, pCallback->m_eResult == k_EResultOK);
|
writeStatsStored(fd, pCallback->m_eResult == k_EResultOK);
|
||||||
} // SteamBridge::OnUserStatsStored
|
} // SteamBridge::OnUserStatsStored
|
||||||
|
|
||||||
static bool processCommand(const uint8 *buf, unsigned int buflen, PipeType fd) {
|
static bool processCommand(const uint8 *buf, unsigned int buflen, PipeType fd) {
|
||||||
if (buflen == 0)
|
if (buflen == 0)
|
||||||
return true;
|
return true;
|
||||||
|
@ -667,9 +663,7 @@ static int initSteamworks(PipeType fd) {
|
||||||
GSteamApps = SteamApps();
|
GSteamApps = SteamApps();
|
||||||
|
|
||||||
GAppID = GSteamUtils ? SteamUtils()->GetAppID() : 0;
|
GAppID = GSteamUtils ? SteamUtils()->GetAppID() : 0;
|
||||||
#ifndef _WIN32 // FIXME
|
|
||||||
GUserID = GSteamUser ? SteamUser()->GetSteamID().ConvertToUint64() : 0;
|
GUserID = GSteamUser ? SteamUser()->GetSteamID().ConvertToUint64() : 0;
|
||||||
#endif
|
|
||||||
GSteamBridge = new SteamBridge(fd);
|
GSteamBridge = new SteamBridge(fd);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue