[Applets] Add initial stuff

This commit is contained in:
wheremyfoodat 2023-08-04 19:09:43 +03:00
parent 15ed62e952
commit 8006ec63b0
5 changed files with 33 additions and 2 deletions

View file

@ -130,6 +130,7 @@ set(FS_SOURCE_FILES src/core/fs/archive_self_ncch.cpp src/core/fs/archive_save_d
src/core/fs/ivfc.cpp
)
set(APPLET_SOURCE_FILES src/core/applets/applet.cpp src/core/applets/mii_selector.cpp)
set(RENDERER_SW_SOURCE_FILES src/core/renderer_sw/renderer_sw.cpp)
set(HEADER_FILES include/emulator.hpp include/helpers.hpp include/termcolor.hpp
@ -157,7 +158,7 @@ set(HEADER_FILES include/emulator.hpp include/helpers.hpp include/termcolor.hpp
include/crypto/aes_engine.hpp include/metaprogramming.hpp include/PICA/pica_vertex.hpp
include/config.hpp include/services/ir_user.hpp include/http_server.hpp include/cheats.hpp
include/action_replay.hpp include/renderer_sw/renderer_sw.hpp include/compiler_builtins.hpp
include/fs/romfs.hpp include/fs/ivfc.hpp
include/fs/romfs.hpp include/fs/ivfc.hpp include/applets/applet.hpp include/applets/mii_selector.hpp
)
set(THIRD_PARTY_SOURCE_FILES third_party/imgui/imgui.cpp
@ -175,6 +176,7 @@ source_group("Source Files\\Core\\Filesystem" FILES ${FS_SOURCE_FILES})
source_group("Source Files\\Core\\Kernel" FILES ${KERNEL_SOURCE_FILES})
source_group("Source Files\\Core\\Loader" FILES ${LOADER_SOURCE_FILES})
source_group("Source Files\\Core\\Services" FILES ${SERVICE_SOURCE_FILES})
source_group("Source Files\\Core\\Applets" FILES ${APPLET_SOURCE_FILES})
source_group("Source Files\\Core\\PICA" FILES ${PICA_SOURCE_FILES})
source_group("Source Files\\Core\\Software Renderer" FILES ${RENDERER_SW_SOURCE_FILES})
source_group("Source Files\\Third Party" FILES ${THIRD_PARTY_SOURCE_FILES})
@ -236,7 +238,7 @@ endif()
source_group("Header Files\\Core" FILES ${HEADER_FILES})
set(ALL_SOURCES ${SOURCE_FILES} ${FS_SOURCE_FILES} ${CRYPTO_SOURCE_FILES} ${KERNEL_SOURCE_FILES} ${LOADER_SOURCE_FILES} ${SERVICE_SOURCE_FILES}
${RENDERER_SW_SOURCE_FILES} ${PICA_SOURCE_FILES} ${THIRD_PARTY_SOURCE_FILES} ${HEADER_FILES})
${APPLET_SOURCE_FILES} ${RENDERER_SW_SOURCE_FILES} ${PICA_SOURCE_FILES} ${THIRD_PARTY_SOURCE_FILES} ${HEADER_FILES})
if(ENABLE_OPENGL)
# Add the OpenGL source files to ALL_SOURCES

View file

@ -0,0 +1,16 @@
#pragma once
#include "helpers.hpp"
#include "memory.hpp"
#include "result/result.hpp"
class AppletBase {
Memory& mem;
public:
// Called by APT::StartLibraryApplet and similar
virtual Result::HorizonResult start() = 0;
virtual void reset() = 0;
AppletBase(Memory& mem) : mem(mem) {}
};

View file

@ -0,0 +1,8 @@
#include "applets/applet.hpp"
class MiiSelectorApplet final : public AppletBase {
virtual Result::HorizonResult start() override;
virtual void reset() override;
MiiSelectorApplet(Memory& memory) : AppletBase(memory) {}
};

View file

View file

@ -0,0 +1,5 @@
#include "applets/mii_selector.hpp"
void MiiSelectorApplet::reset() {}
Result::HorizonResult MiiSelectorApplet::start() { return Result::Success; }