Fix compilation warnings and stop demos when hosting (#313)

* [WIP] fix warnings

Committing now as is for Isaac to take a look at this.
Having issues with VERSION_TEXT

* Fix VERSION_TEXT crash and stop demos on host
This commit is contained in:
Agent X 2023-03-21 22:41:43 -04:00 committed by GitHub
parent 7e46ce4a21
commit 53b8a2f8e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 8 deletions

View file

@ -221,7 +221,7 @@ def build_constant(processed_constant):
constants = [processed_constant] constants = [processed_constant]
for c in constants: for c in constants:
s += '%s = %s\n' % (c[0], c[1]) s += '%s = %s\n' % (c[0], c[1].replace('"', "'"))
return s return s
@ -327,7 +327,7 @@ def def_constant(processed_constant):
return s return s
for c in [processed_constant]: for c in [processed_constant]:
if "'" in c[1]: if '"' in c[1]:
s += '\n--- @type string\n' s += '\n--- @type string\n'
else: else:
s += '\n--- @type integer\n' s += '\n--- @type integer\n'

View file

@ -11489,4 +11489,4 @@ MINOR_VERSION_NUMBER = 0
VERSION_NUMBER = 32 VERSION_NUMBER = 32
--- @type string --- @type string
VERSION_TEXT = 'beta' VERSION_TEXT = "beta"

View file

@ -28,6 +28,7 @@ Forward port '\\#d0d0ff\\%d\\#c8c8c8\\' for UDP.\
"; ";
void djui_panel_host_message_do_host(UNUSED struct DjuiBase* caller) { void djui_panel_host_message_do_host(UNUSED struct DjuiBase* caller) {
stop_demo(NULL);
djui_panel_shutdown(); djui_panel_shutdown();
extern s16 gCurrSaveFileNum; extern s16 gCurrSaveFileNum;
gCurrSaveFileNum = configHostSaveSlot; gCurrSaveFileNum = configHostSaveSlot;

View file

@ -2,6 +2,7 @@
#include "djui.h" #include "djui.h"
#include "src/pc/network/network.h" #include "src/pc/network/network.h"
#include "src/pc/network/socket/socket.h" #include "src/pc/network/socket/socket.h"
#include "src/pc/network/socket/domain_res.h"
#include "src/pc/utils/misc.h" #include "src/pc/utils/misc.h"
#include "src/pc/configfile.h" #include "src/pc/configfile.h"
#include "src/pc/debuglog.h" #include "src/pc/debuglog.h"

View file

@ -0,0 +1,4 @@
extern char gGetHostName[MAX_CONFIG_STRING];
void domain_resolution(void);
void save_domain(void);

View file

@ -1,4 +1,5 @@
#include "socket.h" #include "socket.h"
#include "domain_res.h"
#include <stdio.h> #include <stdio.h>
#include "pc/configfile.h" #include "pc/configfile.h"
#include "pc/debuglog.h" #include "pc/debuglog.h"

View file

@ -10,11 +10,8 @@
#include "../network.h" #include "../network.h"
extern struct NetworkSystem gNetworkSystemSocket; extern struct NetworkSystem gNetworkSystemSocket;
extern char gGetHostName[MAX_CONFIG_STRING];
SOCKET socket_initialize(void); SOCKET socket_initialize(void);
void socket_shutdown(SOCKET socket); void socket_shutdown(SOCKET socket);
void domain_resolution(void);
void save_domain(void);
#endif #endif

View file

@ -1,7 +1,7 @@
#ifndef VERSION_H #ifndef VERSION_H
#define VERSION_H #define VERSION_H
#define VERSION_TEXT 'beta' #define VERSION_TEXT "beta"
#define VERSION_NUMBER 32 #define VERSION_NUMBER 32
#define MINOR_VERSION_NUMBER 0 #define MINOR_VERSION_NUMBER 0

View file

@ -47,7 +47,7 @@
#include "pc/discord/discordrpc.h" #include "pc/discord/discordrpc.h"
#endif #endif
#include "pc/network/version.h" #include "pc/network/version.h"
#include "pc/network/socket/socket.h" #include "pc/network/socket/domain_res.h"
#include "pc/network/network_player.h" #include "pc/network/network_player.h"
#include "pc/djui/djui.h" #include "pc/djui/djui.h"
#include "pc/debuglog.h" #include "pc/debuglog.h"