taisei/src/arch_switch.c

127 lines
2.9 KiB
C
Raw Normal View History

/*
* This software is licensed under the terms of the MIT License.
* See COPYING for further information.
* ---
* Copyright (c) 2019, p-sam <p-sam@d3vs.net>.
*/
#include "arch_switch.h"
build,ci: Build system maintenance (#350) Squashed commit of the following: commit 9ab0197ee148b15252d9aa8a962474b8c1afd1a5 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 28 23:05:58 2022 +0100 build: add dummy descriptions for deprecated options commit b0c41d4719ce3076d6867bb68ee4991823059d78 Author: Alice D <alice@starwitch.productions> Date: Mon Dec 26 15:18:09 2022 -0500 update docker containers with ones containing meson 0.63.3 commit a2dd4173fc94527f0ab21f6cf4a50b88bbd893bf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:44 2022 +0100 build: featurize audio options commit 7c59e2a56966db2fdba55578cd1b65501f50c3cf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:35 2022 +0100 build: remove dead code commit cf500af137d88a4dd340e31bea024b50fc52559d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:07:37 2022 +0100 doc: update BUILD.rst commit 9764ac706f6780bd47e9adb4a7635be7f2d4dc1f Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 17:12:37 2022 +0100 ci: disable WGI joystick backend for SDL Fails to build with latest llvm-mingw commit 2d4f310b903eeae5a76437ca6151e2468fff2f27 Author: p-sam <p-sam@d3vs.net> Date: Sun Dec 25 17:03:47 2022 +0100 switch: fix missing include commit 9264f1649df458ed970274e2ed8336b572429263 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 14:36:41 2022 +0100 ci: update meson to 0.63.3 due to a bug commit 3e37be3d8f9bd69c8349b8f33154c1074c528081 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 13:42:34 2022 +0100 ci: update build options commit 281a39a4f5718b48f8c05ef261d76c3d2f12fd7e Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:17:07 2022 -0500 ci: change when apt is cleaned up for switch image commit 2f2100a84cc55a194f55bc1993da0dffe15d5243 Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:11:08 2022 -0500 ci: bump switch homebrew container version commit ebaff59260d5518d526d9ceb28eb0636ac207de0 Author: Alice D <alice@starwitch.productions> Date: Sat Dec 17 22:55:39 2022 -0500 ci: bump windows container version commit 7ce6f234199a9c8028debf1dc009a8b4f6cfebd4 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:36:28 2022 +0100 build: featurize renderer options commit a345f21b35f6f8c9ca761f6307731727bf98d54a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:33:30 2022 +0100 build: revert to explicit fallback for libzstd Implicit fallback causes conflicts in the basis_universal subproject https://github.com/mesonbuild/meson/issues/11189 commit b2de61f5c50d1d1246bb39ad6c8cc0ca829ec0df Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 05:29:29 2022 +0100 build: remove debug_opengl This option was always misdocumented, as it only controlled whether GL debugging is on by default. You can still control it with the TAISEI_GL_DEBUG environment variable, which is set to 1 in meson devenv. commit 4c659ba19517ccd4f2bbd70d3af2b7dcbf0f711e Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Dec 16 08:03:37 2022 +0100 build: set up useful env vars for meson devenv Makes Taisei load resources from the source tree, making live reload work; enables OpenGL debugging by default; works around ASan stack use after return false positives. commit 1ddc58b84ae7c5b7733c1c31bfa4b6619d84a04a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 08:06:32 2022 +0100 build: featurize docs; always install licenses commit c3a94d7f5bdeab1c5180972c20526fa54ca37703 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:46:28 2022 +0100 build: featurize shader_transpiler commit 619d82ae36a3360c5151623412037eb88bc6acd9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:38:30 2022 +0100 build: allow libzip fallback by default commit 79ab72292a54dc77c739b7abdee307549cacd527 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:35:51 2022 +0100 build: featurize use_libcrypto commit b393077f716f77af59df6c62cb83d16b0e409880 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 05:03:20 2022 +0100 build: featurize validate_glsl commit 7d76484079e3dda8ea042852b61f66908eb174c9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 04:34:31 2022 +0100 build: featurize some more installation options commit 17c0bda2050c5544433b7a25ceaab9270d1ba09c Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 03:24:46 2022 +0100 build: deprecate enable_zip for vfs_zip; convert package_data into feature commit 9a4ef8c091b71218fe872afcc66d47e055f7ab75 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:37:55 2022 +0100 build: deprecate developer=auto; default to false commit 807240e508cd375402973bdabd8a0cf0ad4d9d71 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:24:04 2022 +0100 build: move subproject fallback info into wraps commit 08c953f48773326e4b2b2082052d0654fd540ed2 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:57:33 2022 +0100 build: deprecate 'static' option Meson has a built-in `prefer_static` now commit c5756015374eeef71fcc443d911e1679bfb64167 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:49:31 2022 +0100 build: remove complicated shaderc detection logic Meson does all of this internally since 0.51.0 commit cd2d460d4b6dbb291a4bd1b99e87a9cb69805203 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:45:17 2022 +0100 build: Require meson >=0.63.0 commit 10abd790f7d71fecc0884ffb4f32880f4f0ddd4d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 05:16:47 2022 +0100 ci: remove meson dist version workaround from release workflow Meson should know the correct version now commit 31a07d8c3cbaec0a49d23e912d74d2e0fd3478d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:46:28 2022 +0100 build: use built-in summary() function commit 0c47f6d14b63335ee051346cb48955f3452b9823 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 04:33:01 2022 +0100 build: remove -Dversion_fallback and introduce .VERSION file The version script will now first try to read the version from a .VERSION file in the source root. If that file does not exist, it will query git. The .VERSION file is not included in the git repository, it is generated for inclusion in source tarballs. Package maintainers who had any use for -Dversion_fallback may want to create the .VERSION file themselves. Additionally, some git-specific files have been removed from source tarballs. commit d32332a5e378b8fb183b1e1609746e60f76aeadc Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:00:07 2022 +0100 build: set the "real" version in project() commit f9a3fbc72956fa680e4b1ed6b3f9dba636c26768 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 01:50:08 2022 +0100 build: raise meson_version and remove some legacy workarounds Effectively 0.56.0 was already required since we started using some of its features at some point. This also fixes all current meson warnings.
2022-12-28 23:15:55 +01:00
#include "renderer/glcommon/debug.h"
#include "util/env.h"
#include "util/io.h"
2021-04-18 15:52:13 +02:00
#include <unistd.h>
#include <switch/services/applet.h>
#include <switch/services/fs.h>
#include <switch/services/ssl.h>
build,ci: Build system maintenance (#350) Squashed commit of the following: commit 9ab0197ee148b15252d9aa8a962474b8c1afd1a5 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 28 23:05:58 2022 +0100 build: add dummy descriptions for deprecated options commit b0c41d4719ce3076d6867bb68ee4991823059d78 Author: Alice D <alice@starwitch.productions> Date: Mon Dec 26 15:18:09 2022 -0500 update docker containers with ones containing meson 0.63.3 commit a2dd4173fc94527f0ab21f6cf4a50b88bbd893bf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:44 2022 +0100 build: featurize audio options commit 7c59e2a56966db2fdba55578cd1b65501f50c3cf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:35 2022 +0100 build: remove dead code commit cf500af137d88a4dd340e31bea024b50fc52559d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:07:37 2022 +0100 doc: update BUILD.rst commit 9764ac706f6780bd47e9adb4a7635be7f2d4dc1f Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 17:12:37 2022 +0100 ci: disable WGI joystick backend for SDL Fails to build with latest llvm-mingw commit 2d4f310b903eeae5a76437ca6151e2468fff2f27 Author: p-sam <p-sam@d3vs.net> Date: Sun Dec 25 17:03:47 2022 +0100 switch: fix missing include commit 9264f1649df458ed970274e2ed8336b572429263 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 14:36:41 2022 +0100 ci: update meson to 0.63.3 due to a bug commit 3e37be3d8f9bd69c8349b8f33154c1074c528081 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 13:42:34 2022 +0100 ci: update build options commit 281a39a4f5718b48f8c05ef261d76c3d2f12fd7e Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:17:07 2022 -0500 ci: change when apt is cleaned up for switch image commit 2f2100a84cc55a194f55bc1993da0dffe15d5243 Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:11:08 2022 -0500 ci: bump switch homebrew container version commit ebaff59260d5518d526d9ceb28eb0636ac207de0 Author: Alice D <alice@starwitch.productions> Date: Sat Dec 17 22:55:39 2022 -0500 ci: bump windows container version commit 7ce6f234199a9c8028debf1dc009a8b4f6cfebd4 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:36:28 2022 +0100 build: featurize renderer options commit a345f21b35f6f8c9ca761f6307731727bf98d54a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:33:30 2022 +0100 build: revert to explicit fallback for libzstd Implicit fallback causes conflicts in the basis_universal subproject https://github.com/mesonbuild/meson/issues/11189 commit b2de61f5c50d1d1246bb39ad6c8cc0ca829ec0df Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 05:29:29 2022 +0100 build: remove debug_opengl This option was always misdocumented, as it only controlled whether GL debugging is on by default. You can still control it with the TAISEI_GL_DEBUG environment variable, which is set to 1 in meson devenv. commit 4c659ba19517ccd4f2bbd70d3af2b7dcbf0f711e Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Dec 16 08:03:37 2022 +0100 build: set up useful env vars for meson devenv Makes Taisei load resources from the source tree, making live reload work; enables OpenGL debugging by default; works around ASan stack use after return false positives. commit 1ddc58b84ae7c5b7733c1c31bfa4b6619d84a04a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 08:06:32 2022 +0100 build: featurize docs; always install licenses commit c3a94d7f5bdeab1c5180972c20526fa54ca37703 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:46:28 2022 +0100 build: featurize shader_transpiler commit 619d82ae36a3360c5151623412037eb88bc6acd9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:38:30 2022 +0100 build: allow libzip fallback by default commit 79ab72292a54dc77c739b7abdee307549cacd527 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:35:51 2022 +0100 build: featurize use_libcrypto commit b393077f716f77af59df6c62cb83d16b0e409880 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 05:03:20 2022 +0100 build: featurize validate_glsl commit 7d76484079e3dda8ea042852b61f66908eb174c9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 04:34:31 2022 +0100 build: featurize some more installation options commit 17c0bda2050c5544433b7a25ceaab9270d1ba09c Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 03:24:46 2022 +0100 build: deprecate enable_zip for vfs_zip; convert package_data into feature commit 9a4ef8c091b71218fe872afcc66d47e055f7ab75 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:37:55 2022 +0100 build: deprecate developer=auto; default to false commit 807240e508cd375402973bdabd8a0cf0ad4d9d71 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:24:04 2022 +0100 build: move subproject fallback info into wraps commit 08c953f48773326e4b2b2082052d0654fd540ed2 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:57:33 2022 +0100 build: deprecate 'static' option Meson has a built-in `prefer_static` now commit c5756015374eeef71fcc443d911e1679bfb64167 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:49:31 2022 +0100 build: remove complicated shaderc detection logic Meson does all of this internally since 0.51.0 commit cd2d460d4b6dbb291a4bd1b99e87a9cb69805203 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:45:17 2022 +0100 build: Require meson >=0.63.0 commit 10abd790f7d71fecc0884ffb4f32880f4f0ddd4d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 05:16:47 2022 +0100 ci: remove meson dist version workaround from release workflow Meson should know the correct version now commit 31a07d8c3cbaec0a49d23e912d74d2e0fd3478d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:46:28 2022 +0100 build: use built-in summary() function commit 0c47f6d14b63335ee051346cb48955f3452b9823 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 04:33:01 2022 +0100 build: remove -Dversion_fallback and introduce .VERSION file The version script will now first try to read the version from a .VERSION file in the source root. If that file does not exist, it will query git. The .VERSION file is not included in the git repository, it is generated for inclusion in source tarballs. Package maintainers who had any use for -Dversion_fallback may want to create the .VERSION file themselves. Additionally, some git-specific files have been removed from source tarballs. commit d32332a5e378b8fb183b1e1609746e60f76aeadc Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:00:07 2022 +0100 build: set the "real" version in project() commit f9a3fbc72956fa680e4b1ed6b3f9dba636c26768 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 01:50:08 2022 +0100 build: raise meson_version and remove some legacy workarounds Effectively 0.56.0 was already required since we started using some of its features at some point. This also fixes all current meson warnings.
2022-12-28 23:15:55 +01:00
#include <switch/services/nifm.h>
#include <switch/runtime/devices/socket.h>
#include <switch/runtime/nxlink.h>
#define NX_LOG_FMT(fmt, ...) tsfprintf(stdout, "[NX] " fmt "\n", ##__VA_ARGS__)
#define NX_LOG(str) NX_LOG_FMT("%s", str)
#define NX_SETENV(name, val) NX_LOG_FMT("Setting env var %s to %s", name, val);env_set_string(name, val, true)
static nxAtExitFn g_nxAtExitFn = NULL;
static char g_programDir[FS_MAX_PATH] = {0};
static AppletHookCookie g_hookCookie;
2023-10-10 18:31:23 +02:00
static s32 g_initialScreenWidth = 1920;
static s32 g_initialScreenHeight = 1080;
static void onAppletHook(AppletHookType hook, void *param) {
switch (hook) {
case AppletHookType_OnExitRequest:
NX_LOG("Got AppletHook OnExitRequest, exiting.\n");
taisei_quit();
break;
default:
break;
}
}
attr_used
void userAppInit(void) {
socketInitializeDefault();
appletLockExit();
appletHook(&g_hookCookie, onAppletHook, NULL);
#ifdef DEBUG
dup2(1, 2);
NX_LOG("stderr -> stdout");
nxlinkStdio();
NX_LOG("nxlink enabled");
#endif
2023-10-10 18:31:23 +02:00
appletGetDefaultDisplayResolution(&g_initialScreenWidth, &g_initialScreenHeight);
appletInitializeGamePlayRecording();
appletSetGamePlayRecordingState(1);
getcwd(g_programDir, FS_MAX_PATH);
build,ci: Build system maintenance (#350) Squashed commit of the following: commit 9ab0197ee148b15252d9aa8a962474b8c1afd1a5 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 28 23:05:58 2022 +0100 build: add dummy descriptions for deprecated options commit b0c41d4719ce3076d6867bb68ee4991823059d78 Author: Alice D <alice@starwitch.productions> Date: Mon Dec 26 15:18:09 2022 -0500 update docker containers with ones containing meson 0.63.3 commit a2dd4173fc94527f0ab21f6cf4a50b88bbd893bf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:44 2022 +0100 build: featurize audio options commit 7c59e2a56966db2fdba55578cd1b65501f50c3cf Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:20:35 2022 +0100 build: remove dead code commit cf500af137d88a4dd340e31bea024b50fc52559d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 19:07:37 2022 +0100 doc: update BUILD.rst commit 9764ac706f6780bd47e9adb4a7635be7f2d4dc1f Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sun Dec 25 17:12:37 2022 +0100 ci: disable WGI joystick backend for SDL Fails to build with latest llvm-mingw commit 2d4f310b903eeae5a76437ca6151e2468fff2f27 Author: p-sam <p-sam@d3vs.net> Date: Sun Dec 25 17:03:47 2022 +0100 switch: fix missing include commit 9264f1649df458ed970274e2ed8336b572429263 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 14:36:41 2022 +0100 ci: update meson to 0.63.3 due to a bug commit 3e37be3d8f9bd69c8349b8f33154c1074c528081 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 24 13:42:34 2022 +0100 ci: update build options commit 281a39a4f5718b48f8c05ef261d76c3d2f12fd7e Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:17:07 2022 -0500 ci: change when apt is cleaned up for switch image commit 2f2100a84cc55a194f55bc1993da0dffe15d5243 Author: Alice D <alice@starwitch.productions> Date: Sun Dec 18 00:11:08 2022 -0500 ci: bump switch homebrew container version commit ebaff59260d5518d526d9ceb28eb0636ac207de0 Author: Alice D <alice@starwitch.productions> Date: Sat Dec 17 22:55:39 2022 -0500 ci: bump windows container version commit 7ce6f234199a9c8028debf1dc009a8b4f6cfebd4 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:36:28 2022 +0100 build: featurize renderer options commit a345f21b35f6f8c9ca761f6307731727bf98d54a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 07:33:30 2022 +0100 build: revert to explicit fallback for libzstd Implicit fallback causes conflicts in the basis_universal subproject https://github.com/mesonbuild/meson/issues/11189 commit b2de61f5c50d1d1246bb39ad6c8cc0ca829ec0df Author: Andrei Alexeyev <akari@taisei-project.org> Date: Sat Dec 17 05:29:29 2022 +0100 build: remove debug_opengl This option was always misdocumented, as it only controlled whether GL debugging is on by default. You can still control it with the TAISEI_GL_DEBUG environment variable, which is set to 1 in meson devenv. commit 4c659ba19517ccd4f2bbd70d3af2b7dcbf0f711e Author: Andrei Alexeyev <akari@taisei-project.org> Date: Fri Dec 16 08:03:37 2022 +0100 build: set up useful env vars for meson devenv Makes Taisei load resources from the source tree, making live reload work; enables OpenGL debugging by default; works around ASan stack use after return false positives. commit 1ddc58b84ae7c5b7733c1c31bfa4b6619d84a04a Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 08:06:32 2022 +0100 build: featurize docs; always install licenses commit c3a94d7f5bdeab1c5180972c20526fa54ca37703 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:46:28 2022 +0100 build: featurize shader_transpiler commit 619d82ae36a3360c5151623412037eb88bc6acd9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:38:30 2022 +0100 build: allow libzip fallback by default commit 79ab72292a54dc77c739b7abdee307549cacd527 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 07:35:51 2022 +0100 build: featurize use_libcrypto commit b393077f716f77af59df6c62cb83d16b0e409880 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 05:03:20 2022 +0100 build: featurize validate_glsl commit 7d76484079e3dda8ea042852b61f66908eb174c9 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 04:34:31 2022 +0100 build: featurize some more installation options commit 17c0bda2050c5544433b7a25ceaab9270d1ba09c Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 03:24:46 2022 +0100 build: deprecate enable_zip for vfs_zip; convert package_data into feature commit 9a4ef8c091b71218fe872afcc66d47e055f7ab75 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:37:55 2022 +0100 build: deprecate developer=auto; default to false commit 807240e508cd375402973bdabd8a0cf0ad4d9d71 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 02:24:04 2022 +0100 build: move subproject fallback info into wraps commit 08c953f48773326e4b2b2082052d0654fd540ed2 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:57:33 2022 +0100 build: deprecate 'static' option Meson has a built-in `prefer_static` now commit c5756015374eeef71fcc443d911e1679bfb64167 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:49:31 2022 +0100 build: remove complicated shaderc detection logic Meson does all of this internally since 0.51.0 commit cd2d460d4b6dbb291a4bd1b99e87a9cb69805203 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Wed Dec 14 01:45:17 2022 +0100 build: Require meson >=0.63.0 commit 10abd790f7d71fecc0884ffb4f32880f4f0ddd4d Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 05:16:47 2022 +0100 ci: remove meson dist version workaround from release workflow Meson should know the correct version now commit 31a07d8c3cbaec0a49d23e912d74d2e0fd3478d1 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:46:28 2022 +0100 build: use built-in summary() function commit 0c47f6d14b63335ee051346cb48955f3452b9823 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 04:33:01 2022 +0100 build: remove -Dversion_fallback and introduce .VERSION file The version script will now first try to read the version from a .VERSION file in the source root. If that file does not exist, it will query git. The .VERSION file is not included in the git repository, it is generated for inclusion in source tarballs. Package maintainers who had any use for -Dversion_fallback may want to create the .VERSION file themselves. Additionally, some git-specific files have been removed from source tarballs. commit d32332a5e378b8fb183b1e1609746e60f76aeadc Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 03:00:07 2022 +0100 build: set the "real" version in project() commit f9a3fbc72956fa680e4b1ed6b3f9dba636c26768 Author: Andrei Alexeyev <akari@taisei-project.org> Date: Mon Dec 12 01:50:08 2022 +0100 build: raise meson_version and remove some legacy workarounds Effectively 0.56.0 was already required since we started using some of its features at some point. This also fixes all current meson warnings.
2022-12-28 23:15:55 +01:00
if(glcommon_debug_requested()) {
// enable Mesa logging:
NX_SETENV("EGL_LOG_LEVEL", "debug");
NX_SETENV("MESA_VERBOSE", "all");
NX_SETENV("MESA_DEBUG", "1");
NX_SETENV("MESA_INFO", "1");
NX_SETENV("MESA_GLSL", "errors");
NX_SETENV("NOUVEAU_MESA_DEBUG", "1");
NX_SETENV("LIBGL_DEBUG", "verbose");
// enable shader debugging in Nouveau:
NX_SETENV("NV50_PROG_OPTIMIZE", "0");
NX_SETENV("NV50_PROG_DEBUG", "1");
NX_SETENV("NV50_PROG_CHIPSET", "0x120");
} else {
// disable error checking and save CPU time
NX_SETENV("MESA_NO_ERROR", "1");
}
}
attr_used
void userAppExit(void) {
socketExit();
appletUnlockExit();
}
int nxAtExit(nxAtExitFn fn) {
if(g_nxAtExitFn == NULL) {
NX_LOG("got exit callback");
g_nxAtExitFn = fn;
return 0;
}
return -1;
}
void __attribute__((weak)) noreturn __libnx_exit(int rc);
void noreturn nxExit(int rc) {
if(g_nxAtExitFn != NULL) {
NX_LOG("calling exit callback");
g_nxAtExitFn();
g_nxAtExitFn = NULL;
}
__libnx_exit(rc);
}
void noreturn nxAbort(void) {
/* Using abort would not give us correct offsets in crash reports,
* nor code region name, so we use __builtin_trap instead */
__builtin_trap();
}
const char* nxGetProgramDir(void) {
return g_programDir;
}
2023-10-10 18:31:23 +02:00
int nxGetInitialScreenWidth(void) {
return g_initialScreenWidth;
}
int nxGetInitialScreenHeight(void) {
return g_initialScreenHeight;
}