projects
/
vrfileman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fallback ton non-srgb when window creation fails
[vrfileman]
/
src
/
opt.cc
diff --git
a/src/opt.cc
b/src/opt.cc
index
6698f8c
..
6e22113
100644
(file)
--- a/
src/opt.cc
+++ b/
src/opt.cc
@@
-6,6
+6,14
@@
Options opt;
Options opt;
+Options def_opt = {
+ 1280, 800,
+ false, // vr
+ true, // srgb
+ false, // fullscreen
+ 0 // path
+};
+
enum {
OPT_SIZE,
OPT_VR,
enum {
OPT_SIZE,
OPT_VR,
@@
-32,10
+40,7
@@
static int arg_handler(optcfg *oc, const char *arg, void *cls);
bool init_options(int argc, char **argv, const char *cfgfile)
{
// default options
bool init_options(int argc, char **argv, const char *cfgfile)
{
// default options
- memset(&opt, 0, sizeof opt);
- opt.width = 1280;
- opt.height = 800;
- opt.srgb = true;
+ opt = def_opt;
optcfg *oc = optcfg_init(options);
optcfg_set_opt_callback(oc, opt_handler, 0);
optcfg *oc = optcfg_init(options);
optcfg_set_opt_callback(oc, opt_handler, 0);