mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-05 21:18:15 +01:00
Add a simple .rpl file example.
This commit is contained in:
parent
f281be50ab
commit
86ea2f1466
15
samples/my_first_rpl/CMakeLists.txt
Normal file
15
samples/my_first_rpl/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
project(my_first_rpl C)
|
||||
include("${WUT_ROOT}/share/wut.cmake" REQUIRED)
|
||||
|
||||
add_executable(my_first_rpl
|
||||
my_first_rpl.c)
|
||||
|
||||
wut_add_exports(my_first_rpl
|
||||
exports.def)
|
||||
|
||||
wut_create_rpl(my_first_rpl.rpl
|
||||
my_first_rpl)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/my_first_rpl.rpl"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
2
samples/my_first_rpl/exports.def
Normal file
2
samples/my_first_rpl/exports.def
Normal file
@ -0,0 +1,2 @@
|
||||
:TEXT
|
||||
my_first_export
|
20
samples/my_first_rpl/my_first_rpl.c
Normal file
20
samples/my_first_rpl/my_first_rpl.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include <coreinit/dynload.h>
|
||||
|
||||
int
|
||||
my_first_export()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
rpl_main(OSDynLoad_Module module,
|
||||
OSDynLoad_EntryReason reason)
|
||||
{
|
||||
if (reason == OS_DYNLOAD_LOADED) {
|
||||
// Do stuff on load
|
||||
} else if (reason == OS_DYNLOAD_UNLOADED) {
|
||||
// Do stuff on unload
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user