diff --git a/samples/mipmap/main.c b/samples/mipmap/main.c index 43f5197..fcefd2a 100644 --- a/samples/mipmap/main.c +++ b/samples/mipmap/main.c @@ -2,6 +2,10 @@ #include #include +#ifdef __DREAMCAST__ +#include +#endif + #include "GL/gl.h" #include "GL/glu.h" #include "GL/glext.h" @@ -175,6 +179,24 @@ void ReSizeGLScene(int Width, int Height) glMatrixMode(GL_MODELVIEW); } +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; +} + void DrawQuad() { glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 0.0f); // Bottom Left Of The Texture and Quad @@ -238,6 +260,9 @@ int main(int argc, char **argv) ReSizeGLScene(640, 480); while(1) { + if(check_start()) + break; + DrawGLScene(); }