mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-02 12:56:05 +00:00
Build three tiny shared libraries that export the real_gamemode_* symbols (complete, without real_gamemode_request_end, without real_gamemode_error_string) and drive the client through them, so no daemon is needed. Check a missing library, a fall back to the second library name, request and release once each, a refusal with the library's reason, a failing release, a missing symbol and a session over the client.
44 lines
594 B
C++
44 lines
594 B
C++
namespace {
|
|
|
|
int startResult = 0;
|
|
int endResult = 0;
|
|
int starts = 0;
|
|
int ends = 0;
|
|
|
|
}
|
|
|
|
extern "C" {
|
|
|
|
int real_gamemode_request_start() {
|
|
++starts;
|
|
return startResult;
|
|
}
|
|
|
|
#ifndef FIXTURE_OMIT_END
|
|
int real_gamemode_request_end() {
|
|
++ends;
|
|
return endResult;
|
|
}
|
|
#endif
|
|
|
|
#ifndef FIXTURE_OMIT_ERROR_STRING
|
|
const char* real_gamemode_error_string() {
|
|
return "fixture daemon is not running";
|
|
}
|
|
#endif
|
|
|
|
void fixture_configure(int start, int end) {
|
|
startResult = start;
|
|
endResult = end;
|
|
}
|
|
|
|
int fixture_starts() {
|
|
return starts;
|
|
}
|
|
|
|
int fixture_ends() {
|
|
return ends;
|
|
}
|
|
|
|
}
|