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

View File

@ -11489,4 +11489,4 @@ MINOR_VERSION_NUMBER = 0
VERSION_NUMBER = 32
--- @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) {
stop_demo(NULL);
djui_panel_shutdown();
extern s16 gCurrSaveFileNum;
gCurrSaveFileNum = configHostSaveSlot;

View File

@ -2,6 +2,7 @@
#include "djui.h"
#include "src/pc/network/network.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/configfile.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 "domain_res.h"
#include <stdio.h>
#include "pc/configfile.h"
#include "pc/debuglog.h"

View File

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

View File

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

View File

@ -47,7 +47,7 @@
#include "pc/discord/discordrpc.h"
#endif
#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/djui/djui.h"
#include "pc/debuglog.h"