summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2015-05-15 15:50:58 -0600
committerBrian Paul <brianp@vmware.com>2015-05-25 09:02:32 -0600
commit40d4d3b3c6c41f240de994c09e02fae357b42848 (patch)
tree1fe0e19f3174082676aaf41b745913ec3748e707
parent1a2fc77f37d9a6aeee77421f719ecaa26d559b27 (diff)
downloadmesa-demos-40d4d3b3c6c41f240de994c09e02fae357b42848.zip
mesa-demos-40d4d3b3c6c41f240de994c09e02fae357b42848.tar.xz
wglinfo: pass the options object to print_screen_info()
To reduce the number of parameters. Acked-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/wgl/wglinfo.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/wgl/wglinfo.c b/src/wgl/wglinfo.c
index 42bf3a7..8693450 100644
--- a/src/wgl/wglinfo.c
+++ b/src/wgl/wglinfo.c
@@ -79,8 +79,7 @@ WndProc(HWND hWnd,
static void
-print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine,
- GLboolean coreProfile, InfoMode mode)
+print_screen_info(HDC _hdc, const struct options *opts, GLboolean coreProfile)
{
WNDCLASS wc;
HWND win;
@@ -253,9 +252,9 @@ print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine,
*/
if (!coreProfile) {
- if (wglExtensions && mode != Brief) {
+ if (wglExtensions && opts->mode != Brief) {
printf("WGL extensions:\n");
- print_extension_list(wglExtensions, singleLine);
+ print_extension_list(wglExtensions, opts->singleLine);
}
printf("OpenGL vendor string: %s\n", glVendor);
printf("OpenGL renderer string: %s\n", glRenderer);
@@ -286,12 +285,12 @@ print_screen_info(HDC _hdc, GLboolean limits, GLboolean singleLine,
}
#endif
- if (mode != Brief) {
+ if (opts->mode != Brief) {
printf("%s extensions:\n", oglString);
- print_extension_list(glExtensions, singleLine);
+ print_extension_list(glExtensions, opts->singleLine);
}
- if (limits) {
+ if (opts->limits) {
print_limits(glExtensions, oglString, version, &extfuncs);
}
}
@@ -646,9 +645,9 @@ main(int argc, char *argv[])
printf("%d\n", b);
}
else {
- print_screen_info(hdc, opts.limits, opts.singleLine, GL_FALSE, opts.mode);
+ print_screen_info(hdc, &opts, GL_FALSE);
printf("\n");
- print_screen_info(hdc, opts.limits, opts.singleLine, GL_TRUE, opts.mode);
+ print_screen_info(hdc, &opts, GL_TRUE);
printf("\n");
if (opts.mode != Brief) {
print_visual_info(hdc, opts.mode);