diff --git a/src/packages/game/IZ_app.c b/src/packages/game/IZ_app.c index 54be353..7fad1c8 100644 --- a/src/packages/game/IZ_app.c +++ b/src/packages/game/IZ_app.c @@ -68,6 +68,7 @@ IZ_AppInitializeResult IZ_AppInitialize(struct IZ_App* app, u8 argc, const char* } void IZ_AppTeardown(struct IZ_App* app) { + IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Shutting down networking..."); IZ_NetClientDisconnect(&app->net_state); IZ_PoolTeardown(&app->pool); IZ_InputTeardown(&app->input_state); diff --git a/src/packages/game/IZ_app_config.c b/src/packages/game/IZ_app_config.c index 356972e..9ec3ead 100644 --- a/src/packages/game/IZ_app_config.c +++ b/src/packages/game/IZ_app_config.c @@ -1,11 +1,11 @@ #include "IZ_app_config.h" void IZ_ConfigGetDefaultPath(char* config_path, size_t string_size) { -#ifdef IZ_DEBUG +//#ifdef IZ_DEBUG const char* config_path_dir = SDL_GetBasePath(); -#else - const char* config_path_dir = SDL_GetPrefPath("Modal Studios", IZ_APP_NAME); -#endif +//#else +// const char* config_path_dir = SDL_GetPrefPath("Modal Studios", IZ_APP_NAME); +//#endif IZ_memcpy(config_path, string_size, config_path_dir, 128); IZ_strcat(config_path, string_size, IZ_CONFIG_GAME_PATH); diff --git a/src/packages/game/output/video/IZ_video.c b/src/packages/game/output/video/IZ_video.c index cf3a31a..4fe6870 100644 --- a/src/packages/game/output/video/IZ_video.c +++ b/src/packages/game/output/video/IZ_video.c @@ -84,7 +84,7 @@ IZ_ProcedureResult IZ_VideoInitialize(IZ_VideoState* state, void* user_data, con SDL_WINDOW_SHOWN ); if (window == NULL) { -// fprintf_s(stderr, "Window could not be created! SDL_Error: %s\n", SDL_GetError()); + IZ_LogError("Window could not be created! Reason: %s", SDL_GetError()); return -3; } state->window = window; diff --git a/src/packages/net/IZ_net_client.c b/src/packages/net/IZ_net_client.c index 3c3bbad..e01786a 100644 --- a/src/packages/net/IZ_net_client.c +++ b/src/packages/net/IZ_net_client.c @@ -12,7 +12,7 @@ bool IZ_NetClientIsValidReconnectIntervalSeconds(long reconnect_interval_secs) { return (3 <= reconnect_interval_secs && reconnect_interval_secs <= 10); } -static IZ_ConfigItem net_client_config_items[IZ_PLAYERS + 3]; +static IZ_ConfigItem net_client_config_items[IZ_PLAYERS + 3 + 1]; void IZ_NetClientInitializeConfigItems(IZ_ConfigItem config_items[]) { config_items[0] = (IZ_ConfigItem) { @@ -146,12 +146,11 @@ void IZ_NetClientConnect(IZ_NetClientState* state, IZ_WSClientInitializeParams p } void IZ_NetClientDisconnect(IZ_NetClientState* state) { - IZ_LogInfo(IZ_LOG_CATEGORY_GLOBAL, "Shutting down networking..."); if (state->status == IZ_NET_CLIENT_STATUS_PRISTINE) { return; } if (state->binding.connection) { - IZ_WSClientVHostData *vhd = (IZ_WSClientVHostData *) lws_protocol_vh_priv_get( + IZ_WSClientVHostData* vhd = (IZ_WSClientVHostData*) lws_protocol_vh_priv_get( lws_get_vhost(state->binding.connection), lws_get_protocol(state->binding.connection) ); diff --git a/src/packages/server/IZ_app_config.c b/src/packages/server/IZ_app_config.c index 8df3140..3be5587 100644 --- a/src/packages/server/IZ_app_config.c +++ b/src/packages/server/IZ_app_config.c @@ -1,11 +1,11 @@ #include "IZ_app_config.h" void IZ_ConfigGetDefaultPath(char* config_path, size_t string_size) { -#ifdef IZ_DEBUG +//#ifdef IZ_DEBUG const char* config_path_dir = SDL_GetBasePath(); -#else - const char* config_path_dir = SDL_GetPrefPath("Modal Studios", IZ_APP_NAME); -#endif +//#else +// const char* config_path_dir = SDL_GetPrefPath("Modal Studios", IZ_APP_NAME); +//#endif IZ_memcpy(config_path, string_size, config_path_dir, 128); IZ_strcat(config_path, string_size, IZ_CONFIG_SERVER_PATH);