From 4b2a906148b31cfdaf9001163f3efcc13e0a6bf7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 4 Dec 2016 03:45:46 +0100 Subject: [PATCH] (gfx/common) Cleanups --- gfx/common/drm_common.c | 19 ++++++++++--------- gfx/common/egl_common.c | 2 +- gfx/common/win32_common.cpp | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gfx/common/drm_common.c b/gfx/common/drm_common.c index 32ec085889..985d74b285 100644 --- a/gfx/common/drm_common.c +++ b/gfx/common/drm_common.c @@ -20,17 +20,18 @@ #include "drm_common.h" -uint32_t g_connector_id; -int g_drm_fd; -uint32_t g_crtc_id; - -static drmModeCrtc *g_orig_crtc; struct pollfd g_drm_fds; -static drmModeRes *g_drm_resources; -drmModeConnector *g_drm_connector; -static drmModeEncoder *g_drm_encoder; -drmModeModeInfo *g_drm_mode; +uint32_t g_connector_id = 0; +int g_drm_fd = 0; +uint32_t g_crtc_id = 0; + +static drmModeCrtc *g_orig_crtc = NULL; + +static drmModeRes *g_drm_resources = NULL; +drmModeConnector *g_drm_connector = NULL; +static drmModeEncoder *g_drm_encoder = NULL; +drmModeModeInfo *g_drm_mode = NULL; drmEventContext g_drm_evctx; diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index 065a02484f..de75ee291e 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -29,7 +29,7 @@ #include "../../verbosity.h" #include "../../frontend/frontend_driver.h" -bool g_egl_inited; +bool g_egl_inited = false; unsigned g_egl_major = 0; unsigned g_egl_minor = 0; diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index 6595f11a82..990dfb3476 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -113,8 +113,8 @@ typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_ #endif static HMONITOR win32_monitor_last; -static unsigned win32_monitor_count; static HMONITOR win32_monitor_all[MAX_MONITORS]; +static unsigned win32_monitor_count = 0; extern "C" {