|
|
1.1 ! root 1: #pragma once ! 2: ! 3: #ifndef __ND_SDL_H__ ! 4: #define __ND_SDL_H__ ! 5: ! 6: #include <SDL.h> ! 7: #include <SDL_thread.h> ! 8: #include "cycInt.h" ! 9: ! 10: #ifdef __cplusplus ! 11: ! 12: class NDSDL { ! 13: int slot; ! 14: volatile bool doRepaint; ! 15: SDL_Thread* repaintThread; ! 16: SDL_Window* ndWindow; ! 17: SDL_Renderer* ndRenderer; ! 18: SDL_atomic_t blitNDFB; ! 19: Uint32* vram; ! 20: ! 21: static int repainter(void *_this); ! 22: int repainter(void); ! 23: public: ! 24: bool ndVBLtoggle; ! 25: bool ndVideoVBLtoggle; ! 26: ! 27: NDSDL(int slot, Uint32* vram); ! 28: void init(void); ! 29: void uninit(void); ! 30: void pause(bool pause); ! 31: void destroy(void); ! 32: void start_interrupts(); ! 33: }; ! 34: ! 35: extern "C" { ! 36: #endif ! 37: extern const int DISPLAY_VBL_MS; ! 38: extern const int VIDEO_VBL_MS; ! 39: extern const int BLANK_MS; ! 40: ! 41: void nd_vbl_handler(void); ! 42: void nd_video_vbl_handler(void); ! 43: void nd_sdl_destroy(void); ! 44: #ifdef __cplusplus ! 45: } ! 46: #endif ! 47: ! 48: #endif /* __ND_SDL_H__ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.