mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-28 01:43:22 +08:00
Fixed issue with unicode characters in device names breaking networking
This commit is contained in:
parent
d210675242
commit
f2ecf75b0c
@ -420,7 +420,7 @@
|
||||
"assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/51/eb/0a567253cc08c94c5d315a64d9af",
|
||||
"assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/bc/8f/a9c51a09c418136e386b7fdf21c7",
|
||||
"assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/02/e5/84916e123f47ccf11ddda380d699",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/de/d7/c8c170867f5ba0682c6600d388ca",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/0a/8c/4b3344df186e2f26d959bd886c72",
|
||||
"assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/0f/e1/94378b32c786d5365a7810a15d73",
|
||||
"assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/55/8c/8d0a0585e434b94865ae4befc090",
|
||||
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/f6/21/951b7ff02b0ad14b1f0ac55763c4",
|
||||
@ -431,7 +431,7 @@
|
||||
"assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/97/90/39ba65c2ad714429aec82ea1ae3e",
|
||||
"assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/99/2a/bdcfa0932cf73e5cf63fd8113b1b",
|
||||
"assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/4c/c7/0184b8178869d1a3827a1bfcd5bb",
|
||||
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/55/63/fbe4b09943bfaf33438122874ee8",
|
||||
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/00/70/fabda1781ddbb540cd1c2a6278db",
|
||||
"assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/b6/e0/37dd30b686f475733ccc4b3cab49",
|
||||
"assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/20/3f/198dcc5cfed5789042e1595bd048",
|
||||
"assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/03/6a/4db89c5bf1ced8eb5a5615a4ae64",
|
||||
@ -3971,50 +3971,50 @@
|
||||
"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/ed/48/5b2f69e4f296dab9a564ef4ba0b2",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/be/a6/3f794efed8c208476f6303fa4946",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/1d/fc9e33e565475daaac80da5252f0",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/dc/9e3907edeff5bdcdf130f8b46043",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/cf/640a60d55fa9af110489e9f7d654",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/77/12/80eb1c3d63fc6bf5327566645541",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b1/c8/2367fb54d758e69059bc0ab94f01",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5a/23/07b33f5df4c620c596b1d926615b",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/50/aa/71ddcf1aee0398f60f582ec06a50",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/7b/ac1a200be0f37078af0991faca3b",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3f/7d/b103ee4aa60c1713d8959fb37bdb",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/73/8e/afa74f2d49b74723aa64b478e103",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1f/e1/cb24f26e1a1e48fc134e87857a12",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/bd/a1/2e854d38392de862f27690289276",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/84/92/4d157d6cca2ede298dc52fd8e6e0",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e5/f9/7d8c05b6e3d71a486953afe02d2e",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a0/02/dbeec08c32a6532395a63f7ce7a3",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/36/d6/1ec4ee0bbb0697c886c19afc1464",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5a/11/aa1d5f115d7f5a3c036d5a170e5e",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/19/4dfc1c0930f2e22cad9cbed245bb",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/55/06/790f0c625ff2bbc37ec45a192fb2",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/dd/a3/aaf84cba25bcc7920d46fdf6051a",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2c/99/71c64f151f39d4758285863604f2",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ae/1e/84924ade4179dd92122302be3813",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/e6/606201d69229c046ed9fb5c3338b",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/a9/9da6ca254d462675cdce8abdbf0b",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/61/45/eee74c4c33a9a76376b452a75689",
|
||||
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7a/74/60613067338c57246225eb95828d",
|
||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/57/03/10ed96783f925f635679fd54f52b",
|
||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ef/d3/3ce6784fb56347646d4e8c7479ec",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/25/8f3ffb98cb73cf0bdd974b98d947",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e5/be/fba3c5fbf804aed9e0fea8d9f7c1",
|
||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/de/1e/5016a6a654464001226d6d84c3dc",
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/25/05/df2cc676d8bb4e715826984fcd5f",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/16/98/97ddbdaf3e1369e292d6cdf67dc2",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fa/a9/9ef499b38e4d899f7fd362f4b59e",
|
||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f9/35/d728d8ab9fe691366225c5a7e199",
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bf/ef/c48e4357202b00879e6848e81130",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a1/90/c69d9978cc8808612fde4bae8232",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1c/4d/a1a2da08fd6e76aa051c301a5ab8",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/99/21/b71e35e4a679f8677ea00973a9e2",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/8f/1f/473567523fd49f1ffbff870422a9",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/15/52/5e13d441ffd25d1daa220dbde46e",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0c/c8/a617edbe5d634364964ee956239f",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c8/83/db874353ce5a53932abd8c4066e8",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/d8/47/b007731fa81a438ba3eff999bdca",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/1d/8c/795b3914ad039b5dad704199a7e4",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/89/a8/aa768714b1fd24649f08f7ef5905",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/78/c6aa19160783008990a5634c21a0",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/34/fe2ced069d869793f6f5b430edd4",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c2/e1/0d49b8d193c7d21440ab617868e7",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2c/08/eada9fa01448f697b09f18ce2c21",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/13/ec/754591c6f73f787462f3d9f6ae45",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/df/a4/37e89b60df2e05f0dc1570c46d64",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/03/a0/3e6f783984a75e06200d47d25440",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b4/36/5f5cebd0829854f7136a84b6e225",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/db/42/2d072f3d0c11698f7d8921f24ede",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f3/b8/5fe74e125fc87d5bf61794ebb807",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/cb/1b/a39144509e66e23fed23bbf5406d",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7b/56/ec8fdf4027b27880ff7c6d5ebd54",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ee/c2/4860ea493f0fc8a8f8f3deb3df6d",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/af/11/58fd8c32ab413f93a2e1214d21c7",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/84/87/1f3aa0e529829ce9864171d9eef9",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/46/ee23308d315f098fa3f512936880",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d7/b4/bec563f7f6b755b44f45720a4be1",
|
||||
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a9/57/00f58913c9682e49b123e4acdec3",
|
||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ed/91/d32f9e483961e04864caf779192a",
|
||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ad/48/6e471f169e76089290c872893012",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/73/3f/9826454e5f78857b1ab23cd50772",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/21/7a/e063d50077123b480c648834b88f",
|
||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/62/94/03b217fc591160901dce11a894f2",
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/de/f6/5ea9875cf1f6cf4aa289737cf35c",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0d/64/e4e9dad71e85cdca5e7975d75dbf",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/18/69/0c94ab639a2db0be160b587d9bc0",
|
||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/13/3a/27fbb5c5875a189ab81acf2027a2",
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/00/6cbfb32012f88c6fab179eb41a09",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6a/0b/fb82ed889b08e741a750cc406fff",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/93/5c4c75b89b3b3092c49907c3c1dd",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b5/0e/f6a511e81aa197d0446620a2ac06",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/82/82/136d4e3f0b8bd97b3de991e5d6bb",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/c6/5c/a6de210112c28cd86e85297317f8",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e3/df/f1c722f104a31d366a79bece7312",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/56/7a/3ff0fcf84f7fab86fee6ec1f25f1",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/dc/66/051d9473e188c68bf6b4f9decee8",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/08/c0/051746eaa9b594a61ffa19465f4a",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/42/4fca8fb5d08724f0613250ab9495",
|
||||
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c5/18/29d9fe8e483ce222d3263336f7e6",
|
||||
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/9d/7e/0a5125aa421e722c59d22b8beb19"
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
### 1.6.9 (20472, 2022-02-20)
|
||||
### 1.6.9 (20477, 2022-02-21)
|
||||
- Upgraded Android Python to 3.9.10
|
||||
- Fixed an issue with SSL in Android builds that was preventing communication with the master-server in 1.6.8
|
||||
- Added a new network-diagnostics tool at 'Settings->Advanced->Network Testing'. Can be used to diagnose issues talking to master-servers/etc. (especially useful now that SSL can factor in)
|
||||
- Added clipboard support to Mac test build (thought pasting currently requires ctrl-v instead of cmd-v).
|
||||
- Fixed an issue where non-ascii characters in device names could break network communication.
|
||||
|
||||
### 1.6.8 (20458, 2022-02-16)
|
||||
- Added Filipino language (Thanks David!)
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
namespace ballistica {
|
||||
|
||||
// These are set automatically via script; don't modify them here.
|
||||
const int kAppBuildNumber = 20472;
|
||||
const int kAppBuildNumber = 20477;
|
||||
const char* kAppVersion = "1.6.9";
|
||||
|
||||
// Our standalone globals.
|
||||
|
||||
@ -515,4 +515,12 @@ auto Utils::BaseName(const std::string& val) -> std::string {
|
||||
return lastvalid;
|
||||
}
|
||||
|
||||
auto Utils::StripNonAsciiFromUTF8(const std::string& str) -> std::string {
|
||||
auto uni = UnicodeFromUTF8(str, "wGcwe87");
|
||||
uni.erase(
|
||||
std::remove_if(uni.begin(), uni.end(), [](int i) { return i > 127; }),
|
||||
uni.end());
|
||||
return UTF8FromUnicode(uni);
|
||||
}
|
||||
|
||||
} // namespace ballistica
|
||||
|
||||
@ -40,6 +40,10 @@ class Utils {
|
||||
static auto GetRandomNameList() -> const std::list<std::string>&;
|
||||
static void SetRandomNameList(const std::list<std::string>& names);
|
||||
|
||||
/// Strip non-ascii chars from a utf-8 string (the full chars; not just
|
||||
/// control characters).
|
||||
static auto StripNonAsciiFromUTF8(const std::string& s) -> std::string;
|
||||
|
||||
static auto UnicodeFromUTF8(const std::string& s, const char* loc)
|
||||
-> std::vector<uint32_t>;
|
||||
static auto UTF8FromUnicode(std::vector<uint32_t> unichars) -> std::string;
|
||||
|
||||
@ -1219,9 +1219,6 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) {
|
||||
|
||||
// Ctrl-V or Cmd-V sends paste commands to any interested text fields.
|
||||
// Command-Q or Control-Q quits.
|
||||
if (!repeat_press && keysym->sym == SDLK_v) {
|
||||
printf("PASTE?");
|
||||
}
|
||||
if (!repeat_press && keysym->sym == SDLK_v
|
||||
&& ((keysym->mod & KMOD_CTRL) || (keysym->mod & KMOD_GUI))) { // NOLINT
|
||||
g_ui->SendWidgetMessage(WidgetMessage(WidgetMessage::Type::kPaste));
|
||||
|
||||
@ -787,10 +787,7 @@ auto Platform::IsStdinATerminal() -> bool {
|
||||
auto Platform::GetOSVersionString() -> std::string { return ""; }
|
||||
|
||||
auto Platform::GetUserAgentString() -> std::string {
|
||||
// Fetch our device name here from main thread so it'll be safe
|
||||
// to from other threads later (it gets cached as a string)
|
||||
std::string device = GetDeviceName();
|
||||
|
||||
std::string version = GetOSVersionString();
|
||||
if (!version.empty()) {
|
||||
version = " " + version;
|
||||
@ -832,10 +829,17 @@ auto Platform::GetUserAgentString() -> std::string {
|
||||
if (IsRunningOnTV()) {
|
||||
subplatform += " OnTV";
|
||||
}
|
||||
return std::string("BallisticaCore ") + kAppVersion + subplatform + " ("
|
||||
+ std::to_string(kAppBuildNumber) + ") ("
|
||||
+ g_buildconfig.platform_string() + version + "; " + device + "; "
|
||||
+ GetLocale() + ")";
|
||||
|
||||
std::string out{std::string("BallisticaCore ") + kAppVersion + subplatform
|
||||
+ " (" + std::to_string(kAppBuildNumber) + ") ("
|
||||
+ g_buildconfig.platform_string() + version + "; " + device
|
||||
+ "; " + GetLocale() + ")"};
|
||||
|
||||
// This gets shipped to various places which might choke on fancy unicode
|
||||
// characers, so let's limit to simple ascii.
|
||||
out = Utils::StripNonAsciiFromUTF8(out);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
auto Platform::GetCWD() -> std::string {
|
||||
|
||||
@ -169,7 +169,7 @@ class Platform {
|
||||
// Return en_US or whatnot.
|
||||
virtual auto GetLocale() -> std::string;
|
||||
virtual void SetupDataDirectory();
|
||||
virtual auto GetUserAgentString() -> std::string;
|
||||
auto GetUserAgentString() -> std::string;
|
||||
virtual auto GetOSVersionString() -> std::string;
|
||||
|
||||
/// Set an environment variable as utf8, overwriting if it already exists.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user