summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/test/testbounds.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2026-03-06 13:30:59 -0800
committer3gg <3gg@shellblade.net>2026-03-06 13:30:59 -0800
commit30f41c02aec763d32e62351452da9ef582bc3472 (patch)
tree6bec3f65bfdcbf7f1a631da21a6d613bef5db2fa /contrib/SDL-3.2.8/test/testbounds.c
parent452ff21ca02e315c64ceeb3f21c1ea357aeb1bc8 (diff)
Move contrib libraries to contrib repo
Diffstat (limited to 'contrib/SDL-3.2.8/test/testbounds.c')
-rw-r--r--contrib/SDL-3.2.8/test/testbounds.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/contrib/SDL-3.2.8/test/testbounds.c b/contrib/SDL-3.2.8/test/testbounds.c
deleted file mode 100644
index 083772a..0000000
--- a/contrib/SDL-3.2.8/test/testbounds.c
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
3
4 This software is provided 'as-is', without any express or implied
5 warranty. In no event will the authors be held liable for any damages
6 arising from the use of this software.
7
8 Permission is granted to anyone to use this software for any purpose,
9 including commercial applications, and to alter it and redistribute it
10 freely.
11*/
12
13#include <SDL3/SDL.h>
14#include <SDL3/SDL_main.h>
15#include <SDL3/SDL_test.h>
16
17int main(int argc, char **argv)
18{
19 SDL_DisplayID *displays;
20 int i;
21 SDLTest_CommonState *state;
22
23 /* Initialize test framework */
24 state = SDLTest_CommonCreateState(argv, 0);
25 if (!state) {
26 return 1;
27 }
28
29 /* Parse commandline */
30 if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
31 return 1;
32 }
33
34 if (!SDL_Init(SDL_INIT_VIDEO)) {
35 SDL_Log("SDL_Init(SDL_INIT_VIDEO) failed: %s", SDL_GetError());
36 return 1;
37 }
38
39 displays = SDL_GetDisplays(NULL);
40 if (displays) {
41 for (i = 0; displays[i]; i++) {
42 SDL_Rect bounds = { -1, -1, -1, -1 }, usable = { -1, -1, -1, -1 };
43 SDL_GetDisplayBounds(displays[i], &bounds);
44 SDL_GetDisplayUsableBounds(displays[i], &usable);
45 SDL_Log("Display #%d ('%s'): bounds={(%d,%d),%dx%d}, usable={(%d,%d),%dx%d}",
46 i, SDL_GetDisplayName(displays[i]),
47 bounds.x, bounds.y, bounds.w, bounds.h,
48 usable.x, usable.y, usable.w, usable.h);
49 }
50 SDL_free(displays);
51 }
52
53 SDL_Quit();
54 SDLTest_CommonDestroyState(state);
55 return 0;
56}