The Battle for Wesnoth
1.17.23+dev
conftests
sdl2.cpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2022 - 2023
3
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY.
11
12
See the COPYING file for more details.
13
*/
14
15
#include <SDL2/SDL.h>
16
#include <stdlib.h>
17
#include <string>
18
19
int
main
(
int
,
char
** argv)
20
{
21
int
major = std::stoi(argv[1]);
22
int
minor = std::stoi(argv[2]);
23
int
patchlevel = std::stoi(argv[3]);
24
25
if
(!SDL_VERSION_ATLEAST(major, minor, patchlevel)) {
26
exit(1);
27
}
28
29
SDL_Init(0);
30
SDL_Quit();
31
32
return
0;
33
}
main
int main(int, char **argv)
Definition:
sdl2.cpp:19
Generated by
1.9.1