oops missed g_network_reader

This commit is contained in:
Eric 2022-09-12 16:50:37 -07:00
parent 175232037c
commit 53ccc66ca8
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
7 changed files with 48 additions and 40 deletions

View File

@ -3995,26 +3995,26 @@
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34",
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c9/9b/1988356c188605d63adfd726ae70",
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/90/20/7847611202aae8f7f25f81e11798",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f1/d3/8b4f9456fde946a6f832a0a2ed56",
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9c/f3/a87ed66a967361270c38501207ca",
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/53/2d/f237861e70f755bd2a1bc3ff0bc9",
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1d/c0/f17e88adfa27445f56f349c08e1e",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/48/b87e86d797ea65f9088cebf19c41",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/7d/f7666c243f12b032e0473fe96c8e",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/16/ab/b98796b9f947d710cef4f69e1e54",
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/28/ba/6ce4a4dd0c164173746b8890f7e9",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ba/c2/da7fc794b8d1b2a3c507acc05c74",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5c/6e/3b8ab35122b48710216c3331ed4a",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9d/6d/9c828387ca8ce579e2eb04ac60e9",
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3c/8d/7e5873dfcb1a7d7afedb4931b4ef",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/93/15/13337ede73eb44cbdf1bd3b33b30",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/c4/369e1ee38f63fba86bde9b62d1a8",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8f/14/c9302e20d2959adc852dc375bdce",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c5/cf/220527d9a07378862117ebde3bf4",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/99/4d/6db8b3fb6d3cb45154312bb59cd2",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/43/64/57681573e37a5c29801ca7e931a4",
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/c8/30631d3154a8c450b105da4fba36",
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/81/c8/19c1a99a50a074027e85485b48ef",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5f/5f/93f8a60c6f6d58352a83540792ba",
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b5/1c/c0fe6d5570d238872bfc839b46ac",
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b6/92/91c7675daecf9f2c01672f45b420",
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f5/49/7fff46b30c288ffc7e94c9fd4182",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e9/f3/99c96b36694274aab5f44f0a8c78",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/30/19/031ab0138f689d0fc7698c55f514",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/78/9b/6613bcdbd99cba2abd8994da47e9",
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/85/83/8be76939bf30ad8d43d189099b4c",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a5/bc/374eaeb09819570ba9b9c30707e0",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/37/40/306b6050cc2ab7ce40b8a1935989",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/03/6b/3bdea294966f3d6b5f86ab3f15f1",
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e9/8f/86486943a8e2de808deb812cfdc6",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/72/b886fb6fdb0c36066da3a6d72f40",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bb/e5/425b5f16ffaae0ade584872e6b1c",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a3/c9/44b771f906edf3d63943acd535a8",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/17/b5/95fc75d8b8ee7dc24e2897309ff1",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/93/06/3ff8db73b443613e342010b8d26f",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/60/09/d6e216de302ff8dfbb5966b08f90",
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/60/37044e17e52ca125c1d48af83d03",
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/47/d505c3feea40888985dd335dc8c4",
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/3d/20c78e744ac26a13b7418166d675",
@ -4031,14 +4031,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/79/592c41691e94807d23a783723861",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/d9/36f4cf8527494f419db74ae6c78f",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ee/e5/7f0677e6fb8d7cfa169930579712",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/3f/53e29b476834c1e00b1ed0934b82",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/6f/612238de640a2da2501e4bd29d3d",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/bf/36/218291ca0b4fd005e76261fc2279",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/42/13/58a6b20bbe3e72ff3b055e025fb8",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/7d/a6/268f90b14807bb1740cd2ac65bd5",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/fe/78/35e0537296a08c6516a82417fba4",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b7/5f/41d33fe421bd61e85e54a967c1b4",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1f/b1/6897e3bb590a95dcf85316f286e1",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/69/c1/1694e8c7f55ac1c07277a2b5d7c2",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/73/5d/e1960323b7229bf34dd88a4b7a72",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/2c/13/30518d52dfa93a303ba6033f13d4",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/dc/41/911fb9a80bbe2e8234d8610b0cf3",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/be/e0/9c48a3fc8c3a0caf8a5c2c88ddf4",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/02/bd/6e08bef172191198f82e61f714f6",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/f2/3e/5fbbe38fa5047ac11b10f214ecd9",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/4f/cf/09c154037d8f597fcac94fcf5723",
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7",
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d"
}

View File

@ -1,4 +1,4 @@
### 1.7.7 (build 20835, api 7, 2022-09-12)
### 1.7.7 (build 20837, api 7, 2022-09-12)
- Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread.
- Improved logging of missing playlist game types.
- Some ba.Lstr functionality can now be used in background threads.

View File

@ -38,7 +38,7 @@ def bootstrap() -> None:
# Give a soft warning if we're being used with a different binary
# version than we expect.
expected_build = 20835
expected_build = 20837
running_build: int = env['build_number']
if running_build != expected_build:
print(

View File

@ -278,11 +278,7 @@ void AppFlavor::PushNetworkSetupCall(int port, int telnet_port,
const std::string& telnet_password) {
thread()->PushCall([port, telnet_port, enable_telnet, telnet_password] {
assert(InMainThread());
// Kick these off if they don't exist.
// (do we want to support changing ports on existing ones?)
if (g_network_reader == nullptr) {
new NetworkReader(port);
}
g_network_reader->SetPort(port);
if (g_app->telnet_server == nullptr && enable_telnet) {
new TelnetServer(telnet_port);
assert(g_app->telnet_server);

View File

@ -19,6 +19,7 @@
#include "ballistica/input/input.h"
#include "ballistica/internal/app_internal.h"
#include "ballistica/logic/v1_account.h"
#include "ballistica/networking/network_reader.h"
#include "ballistica/networking/network_writer.h"
#include "ballistica/networking/networking.h"
#include "ballistica/platform/platform.h"
@ -31,7 +32,7 @@
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kAppBuildNumber = 20835;
const int kAppBuildNumber = 20837;
const char* kAppVersion = "1.7.7";
// Our standalone globals.
@ -103,6 +104,7 @@ auto BallisticaMain(int argc, char** argv) -> int {
g_assets_server = new AssetsServer();
g_ui = Object::NewUnmanaged<UI>();
g_networking = new Networking();
g_network_reader = new NetworkReader();
g_network_writer = new NetworkWriter();
g_input = new Input();
g_app_internal = CreateAppInternal();

View File

@ -15,10 +15,19 @@
namespace ballistica {
NetworkReader::NetworkReader(int port) : port4_(port), port6_(port) {
thread_ = new std::thread(RunThreadStatic, this);
NetworkReader::NetworkReader() {
// We're a singleton; make sure we don't exist.
assert(g_network_reader == nullptr);
g_network_reader = this;
}
auto NetworkReader::SetPort(int port) -> void {
assert(InMainThread());
// Currently can't switch once this is set.
if (port4_ != -1) {
return;
}
port4_ = port6_ = port;
thread_ = new std::thread(RunThreadStatic, this);
}
auto NetworkReader::Pause() -> void {

View File

@ -21,7 +21,8 @@ namespace ballistica {
// ensure the sockets exist before doing the actual write.
class NetworkReader {
public:
explicit NetworkReader(int port);
NetworkReader();
auto SetPort(int port) -> void;
auto Pause() -> void;
auto Resume() -> void;
auto port4() const { return port4_; }