Some cleanup
This commit is contained in:
parent
5804084401
commit
f094b712af
26
src/screen.c
26
src/screen.c
|
@ -96,10 +96,6 @@ void ScreenDraw() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsAltDown = false;
|
|
||||||
|
|
||||||
extern bool UserBreak;
|
|
||||||
|
|
||||||
int ScreenProcessEvents() {
|
int ScreenProcessEvents() {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
|
@ -194,24 +190,20 @@ struct Screen ScreenCreate(
|
||||||
ScreenMouseMovedF mousemoved
|
ScreenMouseMovedF mousemoved
|
||||||
) {
|
) {
|
||||||
|
|
||||||
struct Screen screen;
|
|
||||||
|
|
||||||
if (w > WindowWidth)
|
if (w > WindowWidth)
|
||||||
WindowWidth = w;
|
WindowWidth = w;
|
||||||
|
|
||||||
if (h > WindowHeight)
|
if (h > WindowHeight)
|
||||||
WindowHeight = h;
|
WindowHeight = h;
|
||||||
|
|
||||||
screen.Width = w;
|
MainScreen.Width = w;
|
||||||
screen.Height = h;
|
MainScreen.Height = h;
|
||||||
screen.Title = title;
|
MainScreen.Title = title;
|
||||||
|
|
||||||
screen.Draw = draw;
|
MainScreen.Draw = draw;
|
||||||
screen.KeyPressed = keypressed;
|
MainScreen.KeyPressed = keypressed;
|
||||||
screen.KeyReleased = keyreleased;
|
MainScreen.KeyReleased = keyreleased;
|
||||||
screen.MousePressed = mousepressed;
|
MainScreen.MousePressed = mousepressed;
|
||||||
screen.MouseReleased = mousereleased;
|
MainScreen.MouseReleased = mousereleased;
|
||||||
screen.MouseMoved = mousemoved;
|
MainScreen.MouseMoved = mousemoved;
|
||||||
|
|
||||||
MainScreen = screen;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user