cfg.h 852 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _CFG_H
  2. #define _CFG_H
  3. #include <stdint.h>
  4. #define CFG_FILE ((const uint8_t*)"/sd2snes/sd2snes.cfg")
  5. #define LAST_FILE ((const uint8_t*)"/sd2snes/lastgame.cfg")
  6. typedef enum
  7. {
  8. VIDMODE_AUTO = 0,
  9. VIDMODE_60,
  10. VIDMODE_50
  11. } cfg_vidmode_t;
  12. typedef struct _cfg_block
  13. {
  14. uint8_t cfg_ver_maj;
  15. uint8_t cfg_ver_min;
  16. uint8_t last_game_valid;
  17. uint8_t vidmode_menu;
  18. uint8_t vidmode_game;
  19. uint8_t pair_mode_allowed;
  20. uint8_t bsx_use_systime;
  21. uint64_t bsx_time;
  22. } cfg_t;
  23. int cfg_save( void );
  24. int cfg_load( void );
  25. int cfg_save_last_game( uint8_t *fn );
  26. int cfg_get_last_game( uint8_t *fn );
  27. cfg_vidmode_t cfg_get_vidmode_menu( void );
  28. cfg_vidmode_t cfg_get_vidmode_game( void );
  29. void cfg_set_last_game_valid( uint8_t );
  30. uint8_t cfg_is_last_game_valid( void );
  31. uint8_t cfg_is_pair_mode_allowed( void );
  32. #endif