mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-28 09:43:05 +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')}
|
||||
|
||||
if compilers['objc'].get_id() != 'clang'
|
||||
error('This program must be built with Clang! ( try: OBJC=clang CXX=clang++ OBJCXX=clang++ meson build )')
|
||||
if compilers['objc'].get_id() != 'clang' or compilers['objcpp'].get_id() != 'clang'
|
||||
error('This program must be built with Clang! ( try: OBJC=clang OBJCXX=clang++ meson build )')
|
||||
endif
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
crash when the callback from requesting stats is called.
|
||||
basically completely nonfunctional. After some changes it will form the pipes and spawn the process
|
||||
just fine, but steam_api will raise a memory access violation once it calls the shim's callbacks.
|
||||
|
||||
|
||||
## Original Steamshim README:
|
||||
|
|
|
@ -439,16 +439,13 @@ SteamBridge::SteamBridge(PipeType _fd)
|
|||
: m_CallbackUserStatsReceived(this, &SteamBridge::OnUserStatsReceived),
|
||||
m_CallbackUserStatsStored(this, &SteamBridge::OnUserStatsStored),
|
||||
fd(_fd) {} // SteamBridge::SteamBridge
|
||||
|
||||
void SteamBridge::OnUserStatsReceived(UserStatsReceived_t *pCallback) {
|
||||
if (GAppID != pCallback->m_nGameID) {
|
||||
return;
|
||||
}
|
||||
#ifndef _WIN32 // FIXME
|
||||
if (GUserID != pCallback->m_steamIDUser.ConvertToUint64()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
writeStatsReceived(fd, pCallback->m_eResult == k_EResultOK);
|
||||
} // SteamBridge::OnUserStatsReceived
|
||||
|
||||
|
@ -457,7 +454,6 @@ void SteamBridge::OnUserStatsStored(UserStatsStored_t *pCallback) {
|
|||
return;
|
||||
writeStatsStored(fd, pCallback->m_eResult == k_EResultOK);
|
||||
} // SteamBridge::OnUserStatsStored
|
||||
|
||||
static bool processCommand(const uint8 *buf, unsigned int buflen, PipeType fd) {
|
||||
if (buflen == 0)
|
||||
return true;
|
||||
|
@ -667,9 +663,7 @@ static int initSteamworks(PipeType fd) {
|
|||
GSteamApps = SteamApps();
|
||||
|
||||
GAppID = GSteamUtils ? SteamUtils()->GetAppID() : 0;
|
||||
#ifndef _WIN32 // FIXME
|
||||
GUserID = GSteamUser ? SteamUser()->GetSteamID().ConvertToUint64() : 0;
|
||||
#endif
|
||||
GSteamBridge = new SteamBridge(fd);
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue