Tactiliest/TactilityC/Source/tt_app_manifest.cpp
Ken Van Hoeylandt c87200a80d
Project restructuring (fixes macOS builds) (#198)
- Create `Include/` folder for all main projects
- Fix some issues here and there (found while moving things)
- All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
2025-02-01 18:13:20 +01:00

32 lines
799 B
C++

#include "tt_app_manifest.h"
#include <Tactility/Check.h>
#include <Tactility/app/ElfApp.h>
#define TAG "tt_app"
extern "C" {
void tt_app_register(
const ExternalAppManifest* manifest
) {
#ifdef ESP_PLATFORM
assert((manifest->createData == nullptr) == (manifest->destroyData == nullptr));
tt::app::setElfAppManifest(
manifest->name,
manifest->icon,
(tt::app::CreateData)manifest->createData,
(tt::app::DestroyData)manifest->destroyData,
(tt::app::OnCreate)manifest->onCreate,
(tt::app::OnDestroy)manifest->onDestroy,
(tt::app::OnShow)manifest->onShow,
(tt::app::OnHide)manifest->onHide,
(tt::app::OnResult)manifest->onResult
);
#else
tt_crash("TactilityC is not intended for PC/Simulator");
#endif
}
}