mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix C/GTK2/SDL1.2 build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4769 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4e664fe878
commit
32df15a254
4 changed files with 21 additions and 7 deletions
|
@ -7,8 +7,8 @@ extern "C" {
|
|||
|
||||
extern void gtkbuild_init(int32_t *argc, char ***argv);
|
||||
extern void gtkbuild_exit(int32_t r);
|
||||
extern int32_t gtkbuild_msgbox(char *name, char *msg);
|
||||
extern int32_t gtkbuild_ynbox(char *name, char *msg);
|
||||
extern int32_t gtkbuild_msgbox(const char *name, const char *msg);
|
||||
extern int32_t gtkbuild_ynbox(const char *name, const char *msg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ int32_t gtkenabled = 0;
|
|||
|
||||
static GdkPixbuf *appicon = NULL;
|
||||
|
||||
int32_t gtkbuild_msgbox(char *name, char *msg)
|
||||
int32_t gtkbuild_msgbox(const char *name, const char *msg)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
|
@ -34,7 +34,7 @@ int32_t gtkbuild_msgbox(char *name, char *msg)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int32_t gtkbuild_ynbox(char *name, char *msg)
|
||||
int32_t gtkbuild_ynbox(const char *name, const char *msg)
|
||||
{
|
||||
int32_t r;
|
||||
GtkWidget *dialog;
|
||||
|
|
|
@ -375,6 +375,8 @@ int32_t main(int32_t argc, char *argv[])
|
|||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
void setvsync(int32_t sync);
|
||||
#if SDL_MAJOR_VERSION != 1
|
||||
void setvsync(int32_t sync)
|
||||
{
|
||||
if (vsync_render == sync) return;
|
||||
|
@ -384,6 +386,7 @@ void setvsync(int32_t sync)
|
|||
SDL_GL_SetSwapInterval(vsync_render);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int32_t sdlayer_checkversion(void);
|
||||
#if SDL_MAJOR_VERSION != 1
|
||||
|
@ -1363,9 +1366,6 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
{ SDL_GL_MULTISAMPLESAMPLES, glmultisample },
|
||||
{ SDL_GL_STENCIL_SIZE, 1 },
|
||||
{ SDL_GL_ACCELERATED_VISUAL, 1 },
|
||||
#if SDL_MAJOR_VERSION == 1
|
||||
{ SDL_GL_SWAP_CONTROL, vsync_render },
|
||||
#endif
|
||||
};
|
||||
|
||||
do
|
||||
|
|
|
@ -337,6 +337,20 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
if (nogl)
|
||||
return -1;
|
||||
|
||||
struct glattribs
|
||||
{
|
||||
SDL_GLattr attr;
|
||||
int32_t value;
|
||||
} sdlayer_gl_attributes [] =
|
||||
{
|
||||
{ SDL_GL_DOUBLEBUFFER, 1 },
|
||||
{ SDL_GL_MULTISAMPLEBUFFERS, glmultisample > 0 },
|
||||
{ SDL_GL_MULTISAMPLESAMPLES, glmultisample },
|
||||
{ SDL_GL_STENCIL_SIZE, 1 },
|
||||
{ SDL_GL_ACCELERATED_VISUAL, 1 },
|
||||
{ SDL_GL_SWAP_CONTROL, vsync_render },
|
||||
};
|
||||
|
||||
do
|
||||
{
|
||||
SDL_GL_ATTRIBUTES(i, sdlayer_gl_attributes);
|
||||
|
|
Loading…
Reference in a new issue