removed platform depended compiler flag

pull/1/head
vurtun 2015-03-25 18:43:54 +01:00
parent d2549a2f23
commit 9524dfebea
2 changed files with 8 additions and 10 deletions

View File

@ -31,5 +31,5 @@ clang: $(BIN)
$(BIN):
@mkdir -p bin
rm -f bin/$(BIN) $(OBJS)
$(CC) $(SRC) -D_POSIX_C_SOURCE=200809L $(CFLAGS) -o bin/$(BIN) -lSDL2 -lGL -lGLU
$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) -lSDL2 -lGL -lGLU

View File

@ -15,14 +15,12 @@
#include "gui.h"
/* macros */
#define WIN_WIDTH 800
#define WIN_HEIGHT 600
#define DTIME 33
#define MAX_BUFFER (256 * 1024)
#define UNUSED(v) (void)v
#define WIN_WIDTH 600
#define WIN_HEIGHT 400
#define MAX_BUFFER (64 * 1024)
#define MAX_PANELS 4
#define LEN(a)(sizeof(a)/sizeof(a)[0])
#define UNUSED(a)((void)(a))
#define DTIME 33
/* functions */
static void die(const char*,...);
@ -382,7 +380,7 @@ main(int argc, char *argv[])
panel = gui_panel_new(ctx, 20, 20, 200, 200, &config, font);
subpanel = gui_panel_new(ctx, 250, 20, 200, 200, &config, font);
running = 1;
running = gui_true;
while (running) {
SDL_Event ev;
started = SDL_GetTicks();
@ -396,9 +394,9 @@ main(int argc, char *argv[])
else if (ev.type == SDL_KEYUP) krelease(&input, &ev);
}
gui_input_end(&input);
SDL_GetWindowSize(win, &width, &height);
/* ------------------------- GUI --------------------------*/
SDL_GetWindowSize(win, &width, &height);
gui_begin(ctx, (gui_float)width, (gui_float)height);
running = gui_begin_panel(ctx, panel, "Demo",
GUI_PANEL_HEADER|GUI_PANEL_CLOSEABLE|GUI_PANEL_MINIMIZABLE|