[emscripten] Expose IonSoftwareVersion and IonPatchLevel

This commit is contained in:
Romain Goyet
2018-06-22 15:34:42 +02:00
committed by LeaNumworks
parent 5eb4d9ccf6
commit 0634e9ea7d
2 changed files with 9 additions and 1 deletions

View File

@@ -82,4 +82,4 @@ endif
EMFLAGS += -s MODULARIZE=1 -s 'EXPORT_NAME="Epsilon"'
SFLAGS += $(EMFLAGS)
LDFLAGS += $(EMFLAGS) -Oz -s EXPORTED_FUNCTIONS='["_main", "_IonEventsEmscriptenPushKey", "_IonEventsEmscriptenPushEvent"]'
LDFLAGS += $(EMFLAGS) -Oz -s EXPORTED_FUNCTIONS='["_main", "_IonEventsEmscriptenPushKey", "_IonEventsEmscriptenPushEvent", "_IonSoftwareVersion", "_IonPatchLevel"]'

View File

@@ -3,6 +3,14 @@
#include "events_keyboard.h"
#include "../../../apps/global_preferences.h"
extern "C" {
const char * IonSoftwareVersion();
const char * IonPatchLevel();
}
const char * IonSoftwareVersion() { return Ion::softwareVersion(); }
const char * IonPatchLevel() { return Ion::patchLevel(); }
int main(int argc, char * argv[]) {
Ion::Display::Emscripten::init();
Ion::Events::Emscripten::init();