SDL_CreateWindow() has been simplified and no longer takes a window position.
This commit is contained in:
@@ -1,22 +1,17 @@
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
SDL_Window *window = NULL;
|
||||
SDL_Surface *screenSurface = NULL;
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
|
||||
SDL_Log("Could not initialize SDL: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
window = SDL_CreateWindow(
|
||||
"Hello SDL",
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
640, 480,
|
||||
0
|
||||
);
|
||||
window = SDL_CreateWindow("Hello SDL", 640, 480, 0);
|
||||
if (window == NULL) {
|
||||
fprintf(stderr, "could not create window: %s\n", SDL_GetError());
|
||||
SDL_Log("could not create window: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
screenSurface = SDL_GetWindowSurface(window);
|
||||
|
||||
Reference in New Issue
Block a user