Skip to content

Commit

Permalink
Fix flags overwriting Options values
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilevp committed Feb 18, 2019
1 parent 4916326 commit 2adf7a8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions util/application/application.go
Expand Up @@ -108,12 +108,12 @@ func Create(ops Options) (*Application, error) {

// Creates flags if requested (override options defaults)
if ops.EnableFlags {
app.fullScreen = flag.Bool("fullscreen", false, "Starts application with full screen")
app.swapInterval = flag.Int("swapinterval", -1, "Sets the swap buffers interval to this value")
app.targetFPS = flag.Uint("targetfps", 60, "Sets the frame rate in frames per second")
app.noglErrors = flag.Bool("noglerrors", false, "Do not check OpenGL errors at each call (may increase FPS)")
app.cpuProfile = flag.String("cpuprofile", "", "Activate cpu profiling writing profile to the specified file")
app.execTrace = flag.String("exectrace", "", "Activate execution tracer writing data to the specified file")
app.fullScreen = flag.Bool("fullscreen", *app.fullScreen, "Starts application with full screen")
app.swapInterval = flag.Int("swapinterval", *app.swapInterval, "Sets the swap buffers interval to this value")
app.targetFPS = flag.Uint("targetfps", *app.targetFPS, "Sets the frame rate in frames per second")
app.noglErrors = flag.Bool("noglerrors", *app.noglErrors, "Do not check OpenGL errors at each call (may increase FPS)")
app.cpuProfile = flag.String("cpuprofile", *app.cpuProfile, "Activate cpu profiling writing profile to the specified file")
app.execTrace = flag.String("exectrace", *app.execTrace, "Activate execution tracer writing data to the specified file")
flag.Parse()
}

Expand Down

0 comments on commit 2adf7a8

Please sign in to comment.