diff --git a/samples/multitexture_arrays/main.c b/samples/multitexture_arrays/main.c index 0923c6d..f104467 100644 --- a/samples/multitexture_arrays/main.c +++ b/samples/multitexture_arrays/main.c @@ -11,6 +11,10 @@ #include #include +#ifdef __DREAMCAST__ +#include +#endif + #include "GL/gl.h" #include "GL/glu.h" #include "GL/glkos.h" @@ -41,6 +45,23 @@ GLfloat TEXCOORD_ARRAY[4 * 2] = { 0, 0, GLuint ARGB_ARRAY[4] = { 0xFFFF0000, 0xFF0000FF, 0xFF00FF00, 0xFFFFFF00 }; +int check_start() { +#ifdef __DREAMCAST__ + maple_device_t *cont; + cont_state_t *state; + + cont = maple_enum_type(0, MAPLE_FUNC_CONTROLLER); + + if(cont) { + state = (cont_state_t *)maple_dev_status(cont); + + if(state) + return state->buttons & CONT_START; + } +#endif + + return 0; +} /* Multi-Texture Example using Open GL Vertex Buffer Submission. */ void RenderCallback(GLuint texID0, GLuint texID1) { @@ -119,6 +140,9 @@ int main(int argc, char **argv) { GLuint texID1 = glTextureLoadPVR(IMAGE2_FILENAME, 0, 0); while(1) { + if(check_start()) + break; + /* Draw the "scene" */ RenderCallback(texID0, texID1);