diff --git a/client/main.c b/client/main.c index c3e5b54f..535cf9cc 100644 --- a/client/main.c +++ b/client/main.c @@ -951,6 +951,7 @@ void doHelp(char * app) "\n" " -k Enable FPS display\n" " -o FLAG Specify a renderer option (ie: opengl:vsync=0)\n" + " Alternatively specify \"list\" to list all renderer's and options\n" "\n" " -a Auto resize the window to the guest\n" " -n Don't allow the window to be manually resized\n" @@ -1043,6 +1044,20 @@ int main(int argc, char * argv[]) case 'o': { + if (strcasecmp(optarg, "list") == 0) + { + fprintf(stderr, "\nRenderer Option List\n"); + for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i) + { + const LG_Renderer * r = LG_Renderers[i]; + fprintf(stderr, "\n%s\n", r->get_name()); + for(unsigned int i = 0; i < r->option_count; ++i) + fprintf(stderr, " %10s - %s\n", r->options[i].name, r->options[i].desc); + } + fprintf(stderr, "\n"); + return -1; + } + const LG_Renderer * renderer = NULL; RendererOpts * opts = NULL; diff --git a/client/renderers/opengl.c b/client/renderers/opengl.c index 38aa49f3..d388b8ca 100644 --- a/client/renderers/opengl.c +++ b/client/renderers/opengl.c @@ -800,8 +800,18 @@ static void handle_opt_vsync(void * opaque, const char *value) static LG_RendererOpt lgr_opengl_options[] = { - { .name = "mipmap", .validator = LG_RendererValidatorBool, .handler = handle_opt_mipmap }, - { .name = "vsync" , .validator = LG_RendererValidatorBool, .handler = handle_opt_vsync } + { + .name = "mipmap", + .desc = "Enable or disable mipmapping [default: enabled]", + .validator = LG_RendererValidatorBool, + .handler = handle_opt_mipmap + }, + { + .name = "vsync", + .desc ="Enable or disable vsync [default: enabled]", + .validator = LG_RendererValidatorBool, + .handler = handle_opt_vsync + } }; const LG_Renderer LGR_OpenGL =