aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author浅倉麗子2020-07-08 17:51:40 -0400
committer浅倉麗子2020-07-08 17:51:40 -0400
commit1f8d5e61187ddc56401769c7666f7145b2b0790a (patch)
treeafbd97ccac0ac25825dfdcb8c84bdb2bc9afbf42
parentAdd message after setting colour space (diff)
downloadlcd-colour-crunch-1f8d5e61187ddc56401769c7666f7145b2b0790a.tar.gz
Remove newlib
-rw-r--r--CMakeLists.txt9
-rw-r--r--main.c7
2 files changed, 11 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 387c271..28ed8dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,7 @@ set(VPK "${PROJECT_NAME}.vpk")
set(TITLE_NAME "LCD Colour Crunch")
set(TITLE_ID "AKRK00006")
-set(TITLE_VER "01.01")
+set(TITLE_VER "01.02")
add_executable("${ELF}"
main.c
@@ -75,7 +75,14 @@ target_link_libraries("${ELF}"
fnblit
SceAVConfig_stub
SceDisplay_stub
+ SceKernelThreadMgr_stub
+ SceLibKernel_stub
SceRegistryMgr_stub
+ SceSysmem_stub
+)
+
+target_link_options("${ELF}"
+ PRIVATE -nostdlib
)
add_custom_command(OUTPUT boot_param.bin
diff --git a/main.c b/main.c
index b4dd927..da5ae8f 100644
--- a/main.c
+++ b/main.c
@@ -18,6 +18,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <psp2/avconfig.h>
#include <psp2/display.h>
#include <psp2/kernel/clib.h>
+#include <psp2/kernel/processmgr.h>
#include <psp2/kernel/sysmem.h>
#include <psp2/kernel/threadmgr.h>
#include <psp2/registrymgr.h>
@@ -25,9 +26,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
extern char _binary_font_sfn_start[];
-int _newlib_heap_size_user = 4 * 1024;
-
-int main(int argc, char **argv) { (void)argc; (void)argv;
+void _start(int args, void *argp) { (void)args; (void)argp;
int v;
sceRegMgrGetKeyInt("/CONFIG/DISPLAY/", "color_space_mode", &v);
@@ -61,5 +60,5 @@ int main(int argc, char **argv) { (void)argc; (void)argv;
sceKernelDelayThread(1 * 1000 * 1000);
done:
- return 0;
+ sceKernelExitProcess(0);
}