diff --git a/samples/blend_test/main.c b/samples/blend_test/main.c index 191bbe9..cd47cc6 100644 --- a/samples/blend_test/main.c +++ b/samples/blend_test/main.c @@ -4,6 +4,10 @@ * output and incorrect depth testing */ +#ifdef __DREAMCAST__ +#include +#endif + #include "GL/gl.h" #include "GL/glu.h" #include "GL/glkos.h" @@ -42,6 +46,23 @@ 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(const float* colour) { glBegin(GL_QUADS); @@ -98,6 +119,9 @@ int main(int argc, char **argv) ReSizeGLScene(640, 480); while(1) { + if(check_start()) + break; + DrawGLScene(); }