From 35d095c2cf69faf7ed2a068a092915ec4b5bc46c Mon Sep 17 00:00:00 2001 From: TLOPOOperations Date: Mon, 22 Oct 2018 16:16:17 -0700 Subject: [PATCH] GSG: Fix symbol name conflict --- panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx | 10 +++++----- panda/src/wgldisplay/wglGraphicsStateGuardian.cxx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 904f47afc3..b7b0f7d3e7 100644 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -5240,9 +5240,9 @@ calc_fb_properties(DWORD cformat, DWORD dformat, #define GAMMA_1 (255.0 * 256.0) static bool _gamma_table_initialized = false; -static unsigned short _orignial_gamma_table [256 * 3]; +static unsigned short _original_gamma_table [256 * 3]; -void _create_gamma_table (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) { +void _create_gamma_table_dx9 (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) { int i; double gamma_correction; @@ -5304,7 +5304,7 @@ get_gamma_table(void) { HDC hdc = GetDC(nullptr); if (hdc) { - if (GetDeviceGammaRamp (hdc, (LPVOID) _orignial_gamma_table)) { + if (GetDeviceGammaRamp (hdc, (LPVOID) _original_gamma_table)) { _gamma_table_initialized = true; get = true; } @@ -5329,10 +5329,10 @@ static_set_gamma(bool restore, PN_stdfloat gamma) { unsigned short ramp [256 * 3]; if (restore && _gamma_table_initialized) { - _create_gamma_table (gamma, &_orignial_gamma_table [0], &_orignial_gamma_table [256], &_orignial_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]); + _create_gamma_table_dx9 (gamma, &_original_gamma_table [0], &_original_gamma_table [256], &_original_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]); } else { - _create_gamma_table (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]); + _create_gamma_table_dx9 (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]); } if (SetDeviceGammaRamp (hdc, ramp)) { diff --git a/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx b/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx index 735f7fc409..c98f12cf48 100644 --- a/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx +++ b/panda/src/wgldisplay/wglGraphicsStateGuardian.cxx @@ -778,9 +778,9 @@ register_twindow_class() { #define GAMMA_1 (255.0 * 256.0) static bool _gamma_table_initialized = false; -static unsigned short _orignial_gamma_table [256 * 3]; +static unsigned short _original_gamma_table [256 * 3]; -void _create_gamma_table (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) { +void _create_gamma_table_wgl (PN_stdfloat gamma, unsigned short *original_red_table, unsigned short *original_green_table, unsigned short *original_blue_table, unsigned short *red_table, unsigned short *green_table, unsigned short *blue_table) { int i; double gamma_correction; @@ -842,7 +842,7 @@ get_gamma_table(void) { HDC hdc = GetDC(nullptr); if (hdc) { - if (GetDeviceGammaRamp (hdc, (LPVOID) _orignial_gamma_table)) { + if (GetDeviceGammaRamp (hdc, (LPVOID) _original_gamma_table)) { _gamma_table_initialized = true; get = true; } @@ -867,10 +867,10 @@ static_set_gamma(bool restore, PN_stdfloat gamma) { unsigned short ramp [256 * 3]; if (restore && _gamma_table_initialized) { - _create_gamma_table (gamma, &_orignial_gamma_table [0], &_orignial_gamma_table [256], &_orignial_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]); + _create_gamma_table_wgl (gamma, &_original_gamma_table [0], &_original_gamma_table [256], &_original_gamma_table [512], &ramp [0], &ramp [256], &ramp [512]); } else { - _create_gamma_table (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]); + _create_gamma_table_wgl (gamma, 0, 0, 0, &ramp [0], &ramp [256], &ramp [512]); } if (SetDeviceGammaRamp (hdc, ramp)) {