X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plat.h;h=d48a5412f1304fb3bce64355920e2aa399ab44aa;hb=87dc66a0252fe3a19ca10db73d495724a2193e71;hp=139ea4711883326919c8576cd6768ea34e8d4876;hpb=a1b30e1a4a93f8104a1119e4387fa83ba777c712;p=libpicofe.git diff --git a/plat.h b/plat.h index 139ea47..d48a541 100644 --- a/plat.h +++ b/plat.h @@ -1,6 +1,8 @@ #ifndef LIBPICOFE_PLAT_H #define LIBPICOFE_PLAT_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -13,8 +15,13 @@ struct plat_target { int (*hwfilter_set)(int which); int (*lcdrate_set)(int is_pal); int (*gamma_set)(int val, int black_level); - int (*step_volume)(int is_up); - char **hwfilters; + int (*step_volume)(int *volume, int diff); + int (*switch_layer)(int which, int enable); + const char **vout_methods; + int vout_method; + int vout_fullscreen; + const char **hwfilters; + int hwfilter; }; extern struct plat_target plat_target; @@ -70,10 +77,18 @@ static __inline int plat_target_gamma_set(int val, int black_level) } /* step sound volume up or down */ -static __inline int plat_target_step_volume(int is_up) +static __inline int plat_target_step_volume(int *volume, int diff) { if (plat_target.step_volume) - return plat_target.step_volume(is_up); + return plat_target.step_volume(volume, diff); + return -1; +} + +/* switch device graphics layers/overlays */ +static __inline int plat_target_switch_layer(int which, int enable) +{ + if (plat_target.switch_layer) + return plat_target.switch_layer(which, enable); return -1; } @@ -89,6 +104,9 @@ void plat_video_wait_vsync(void); /* return the dir/ where configs, saves, bios, etc. are found */ int plat_get_root_dir(char *dst, int len); +/* return the dir/ where skin files are found */ +int plat_get_skin_dir(char *dst, int len); + int plat_is_dir(const char *path); int plat_wait_event(int *fds_hnds, int count, int timeout_ms); void plat_sleep_ms(int ms); @@ -96,6 +114,7 @@ void plat_sleep_ms(int ms); void *plat_mmap(unsigned long addr, size_t size, int need_exec, int is_fixed); void *plat_mremap(void *ptr, size_t oldsize, size_t newsize); void plat_munmap(void *ptr, size_t size); +int plat_mem_set_exec(void *ptr, size_t size); /* timers, to be used for time diff and must refer to the same clock */ unsigned int plat_get_ticks_ms(void);