mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
formal Pocket C.H.I.P support
This commit is contained in:
parent
b0bf4f13be
commit
c724a490fb
3 changed files with 20 additions and 2 deletions
|
@ -181,6 +181,14 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
|
|||
add_definitions(-D_Noreturn=)
|
||||
endif(MAEMO5)
|
||||
|
||||
if(POCKETCHIP)
|
||||
add_definitions(-DPOCKETCHIP=1)
|
||||
endif(POCKETCHIP)
|
||||
|
||||
if(MAEMO5 OR POCKETCHIP)
|
||||
add_definitions(-DLIBSUPERDERPY_EMULATE_TOUCH=1)
|
||||
endif(MAEMO5 OR POCKETCHIP)
|
||||
|
||||
set(GAMESTATE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
||||
|
||||
if(APPLE)
|
||||
|
|
|
@ -105,8 +105,8 @@ static inline void HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef MAEMO5
|
||||
// on Maemo we get mouse events instead of touch ones, so we'll rewrite them by ourselves
|
||||
#ifdef LIBSUPERDERPY_EMULATE_TOUCH
|
||||
// on some platforms (like Maemo or Pocket C.H.I.P) we get mouse events instead of touch ones, so we'll rewrite them by ourselves
|
||||
|
||||
if ((ev->type == ALLEGRO_EVENT_MOUSE_AXES) || (ev->type == ALLEGRO_EVENT_MOUSE_BUTTON_DOWN) || (ev->type == ALLEGRO_EVENT_MOUSE_BUTTON_UP)) {
|
||||
switch (ev->type) {
|
||||
|
|
10
src/utils.c
10
src/utils.c
|
@ -394,6 +394,16 @@ SYMBOL_EXPORT const char* FindDataFilePath(struct Game* game, const char* filena
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef POCKETCHIP
|
||||
char origfn[255] = "pocketchip/";
|
||||
strncat(origfn, filename, 243);
|
||||
|
||||
result = TestDataFilePath(game, origfn);
|
||||
if (result) {
|
||||
return AddGarbage(game, result);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
char origfn[255] = "emscripten/";
|
||||
strncat(origfn, filename, 243);
|
||||
|
|
Loading…
Reference in a new issue