Fix Super Meat Boy ignoring controls

This commit is contained in:
igor725 2024-04-24 11:44:28 +03:00
parent 89ffbeb1b3
commit e8756e17b2
No known key found for this signature in database
GPG Key ID: 46F13BBE46F8569D
6 changed files with 15 additions and 3 deletions

View File

@ -43,7 +43,8 @@ class INetworking {
* @param info * @param info
* @return int32_t * @return int32_t
*/ */
virtual int32_t netCtlGetInfo(int code, SceNetCtlInfo* info) = 0; virtual int32_t netCtlGetInfo(int32_t code, SceNetCtlInfo* info) = 0;
virtual int32_t netCtlGetState(int32_t* state) = 0;
/* SceNet facility */ /* SceNet facility */

View File

@ -36,6 +36,11 @@ int32_t OfflineNet::netCtlGetInfo(int32_t code, SceNetCtlInfo* info) {
return Err::NetCtl::NOT_CONNECTED; return Err::NetCtl::NOT_CONNECTED;
} }
int32_t OfflineNet::netCtlGetState(int32_t* state) {
*state = 0; // IP address obtained
return Ok;
}
SceNetId OfflineNet::resolverCreate(const char* name, int memid, int flags) { SceNetId OfflineNet::resolverCreate(const char* name, int memid, int flags) {
static SceNetId id = 0; static SceNetId id = 0;
return ++id; return ++id;

View File

@ -13,6 +13,7 @@ class OfflineNet: public INetworking {
* @return int32_t * @return int32_t
*/ */
int32_t netCtlGetInfo(int32_t code, SceNetCtlInfo* info) final; int32_t netCtlGetInfo(int32_t code, SceNetCtlInfo* info) final;
int32_t netCtlGetState(int32_t* state) final;
/* SceNet facility */ /* SceNet facility */

View File

@ -17,6 +17,7 @@ class OnlineNet: public INetworking {
* @return int32_t * @return int32_t
*/ */
int32_t netCtlGetInfo(int32_t code, SceNetCtlInfo* info) final; int32_t netCtlGetInfo(int32_t code, SceNetCtlInfo* info) final;
int32_t netCtlGetState(int32_t* state) final;
/* SceNet facility */ /* SceNet facility */

View File

@ -189,3 +189,8 @@ int32_t OnlineNet::netCtlGetInfo(int32_t code, SceNetCtlInfo* info) {
return Ok; return Ok;
} }
int32_t OnlineNet::netCtlGetState(int32_t* state) {
*state = 3; // IP address obtained
return Ok;
}

View File

@ -35,8 +35,7 @@ EXPORT SYSV_ABI int sceNetCtlGetResult(int eventType, int* errorCode) {
} }
EXPORT SYSV_ABI int sceNetCtlGetState(int* state) { EXPORT SYSV_ABI int sceNetCtlGetState(int* state) {
*state = 3; // IP address obtained return accessNetworking().netCtlGetState(state);
return Ok;
} }
EXPORT SYSV_ABI int sceNetCtlGetInfo(int code, SceNetCtlInfo* info) { EXPORT SYSV_ABI int sceNetCtlGetInfo(int code, SceNetCtlInfo* info) {