mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 07:25:37 -04:00
Add a bunch of #ifdefs to keep things working as expected on linux
This commit is contained in:
+8
-13
@@ -1,6 +1,3 @@
|
||||
|
||||
|
||||
/*
|
||||
/*!
|
||||
* @file kdsnetm.cpp
|
||||
* Low-level DECI2 wrapper for ksocket
|
||||
@@ -30,10 +27,12 @@ void kdsnetm_init_globals() {
|
||||
protoBlock.reset();
|
||||
}
|
||||
|
||||
// TODO-WINDOWS
|
||||
#ifdef __linux__
|
||||
/*!
|
||||
* Register GOAL DECI2 Protocol Driver with DECI2 service
|
||||
* DONE, EXACT
|
||||
|
||||
*/
|
||||
void InitGoalProto() {
|
||||
protoBlock.socket = sceDeci2Open(DECI2_PROTOCOL, &protoBlock, GoalProtoHandler);
|
||||
if (protoBlock.socket < 0) {
|
||||
@@ -49,12 +48,10 @@ void InitGoalProto() {
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Close the DECI2 Protocol Driver
|
||||
* DONE, EXACT
|
||||
|
||||
*/
|
||||
void ShutdownGoalProto() {
|
||||
if (protoBlock.socket > 0) {
|
||||
sceDeci2Close(protoBlock.socket);
|
||||
@@ -65,7 +62,7 @@ void ShutdownGoalProto() {
|
||||
* Handle a DECI2 Protocol Event for the GOAL Proto.
|
||||
* Called by the DECI2 Protocol driver
|
||||
* DONE, added print statements on errors for debugging, EI and SYNC at the end were removed
|
||||
|
||||
*/
|
||||
void GoalProtoHandler(int event, int param, void* opt) {
|
||||
// verify we got the correct opt pointer. It's not clear why the opt pointer is used
|
||||
// like this?
|
||||
@@ -165,7 +162,7 @@ void GoalProtoHandler(int event, int param, void* opt) {
|
||||
* Will block until send is complete.
|
||||
* DONE, original version used an uncached address and had a FlushCache call, which were both
|
||||
* removed
|
||||
|
||||
*/
|
||||
s32 SendFromBufferD(s32 msg_kind, u64 p2, char* data, s32 size) {
|
||||
// wait for send to finish or error first...
|
||||
while (protoBlock.send_status > 0) {
|
||||
@@ -220,11 +217,9 @@ s32 SendFromBufferD(s32 msg_kind, u64 p2, char* data, s32 size) {
|
||||
|
||||
/*!
|
||||
* Print GOAL Protocol status
|
||||
|
||||
*/
|
||||
void GoalProtoStatus() {
|
||||
Msg(6, "gproto: got %d %d\n", protoBlock.most_recent_event, protoBlock.most_recent_param);
|
||||
Msg(6, "gproto: %d %d\n", protoBlock.last_receive_size, protoBlock.send_remaining);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
#endif
|
||||
Reference in New Issue
Block a user