Fix windowed mode setting got reset every start

Fixes issue #42