Bladeren bron

Update network thread function identifier

Use appropriate identifier for function that runs network thread.
feature/data-structs
TheoryOfNekomata 2 jaren geleden
bovenliggende
commit
5b916f263d
4 gewijzigde bestanden met toevoegingen van 4 en 5 verwijderingen
  1. +1
    -1
      src/packages/game/IZ_app.c
  2. +0
    -2
      src/packages/game/IZ_app.h
  3. +1
    -2
      src/packages/game/net/IZ_app.c
  4. +2
    -0
      src/packages/game/net/IZ_app.h

+ 1
- 1
src/packages/game/IZ_app.c Bestand weergeven

@@ -46,7 +46,7 @@ IZ_ProcedureResult IZ_AppInitialize(struct IZ_App* app, u8 argc, const char* arg
return IZ_APP_RUN_INPUT_INIT_ERROR;
}

if (IZ_NetInitialize(&app->net_state, app, IZ_AppConnect, config_path, argc, argv)) {
if (IZ_NetInitialize(&app->net_state, app, IZ_AppRunNetworkingThread, config_path, argc, argv)) {
return IZ_APP_RUN_NETWORKING_ERROR;
}



+ 0
- 2
src/packages/game/IZ_app.h Bestand weergeven

@@ -28,6 +28,4 @@ typedef struct IZ_App {

IZ_ProcedureResult IZ_AppRun(struct IZ_App*, u8, const char**);

IZ_ProcedureResult IZ_AppConnect(void*);

#endif

+ 1
- 2
src/packages/game/net/IZ_app.c Bestand weergeven

@@ -259,8 +259,7 @@ void IZ_WSClientOnReceive(struct lws* wsi, IZ_WSClientSessionData* pss, void* in
}
}

IZ_ProcedureResult IZ_AppConnect(void* app_raw) {
struct IZ_App* app = app_raw;
IZ_ProcedureResult IZ_AppRunNetworkingThread(struct IZ_App* app) {
IZ_NetState* net_state = IZ_AppGetNetState(app);

if (IZ_WSClientInitialize(&net_state->ws, net_state->params)) {


+ 2
- 0
src/packages/game/net/IZ_app.h Bestand weergeven

@@ -50,4 +50,6 @@ void IZ_AppBindConnection(struct IZ_App*, struct lws*);

void IZ_AppHandleOutboundNetworking(struct IZ_App*);

IZ_ProcedureResult IZ_AppRunNetworkingThread(struct IZ_App*);

#endif

Laden…
Annuleren
Opslaan