[PATCH 1/2] Optimize CNF structs by grouping ints & bools

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


---
 src/includes/configuration.h | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/src/includes/configuration.h b/src/includes/configuration.h
index 64d33510..dbaf97ac 100644
--- a/src/includes/configuration.h
+++ b/src/includes/configuration.h
@@ -72,8 +72,8 @@ typedef struct
   bool bEnableSoundSync;
   int nPlaybackFreq;
   int SdlAudioBufferSize;
-  char szYMCaptureFileName[FILENAME_MAX];
   int YmVolumeMixing;
+  char szYMCaptureFileName[FILENAME_MAX];
 } CNF_SOUND;
 
 
@@ -287,35 +287,33 @@ typedef enum
 typedef struct
 {
   MONITORTYPE nMonitorType;
-  int nFrameSkips;
+  bool DisableVideo;
   bool bFullScreen;
-  bool bKeepResolution;
-#if WITH_SDL2
-  bool bResizable;
-#else
-  bool bKeepResolutionST;
-#endif
   bool bAllowOverscan;
   bool bAspectCorrect;
+  bool bShowStatusbar;
+  bool bShowDriveLed;
+  bool bMouseWarp;
+  bool bCrop;
+  bool bForceMax;
   bool bUseExtVdiResolutions;
+  bool bKeepResolution;
+#if !WITH_SDL2
+  bool bKeepResolutionST;
+#else
+  bool bResizable;
+  bool bUseVsync;
+  bool bUseSdlRenderer;
+  int nRenderScaleQuality;
+#endif
   int nSpec512Threshold;
   int nForceBpp;
   int nVdiColors;
   int nVdiWidth;
   int nVdiHeight;
-  bool bMouseWarp;
-  bool bShowStatusbar;
-  bool bShowDriveLed;
-  bool bCrop;
-  bool bForceMax;
   int nMaxWidth;
   int nMaxHeight;
-#if WITH_SDL2
-  bool bUseSdlRenderer;
-  int nRenderScaleQuality;
-  bool bUseVsync;
-#endif
-  bool DisableVideo;
+  int nFrameSkips;
 } CNF_SCREEN;
 
 
-- 
2.20.1


--------------648D7304C4B2443A8158A44F--



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/