Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
2.3 KiB

  1. //===== Copyright � 2005-2008, Valve Corporation, All rights reserved. ======//
  2. //
  3. //
  4. //===========================================================================//
  5. #ifndef VIDEOCFG_H
  6. #define VIDEOCFG_H
  7. #if defined( _WIN32 )
  8. #pragma once
  9. #endif
  10. #include "tier1/utlvector.h"
  11. #include "shaderapi/IShaderDevice.h"
  12. class KeyValues;
  13. enum ConsoleSystemLevel_t
  14. {
  15. CONSOLE_SYSTEM_LEVEL_360 = 360,
  16. CONSOLE_SYSTEM_LEVEL_PS3 = 361
  17. };
  18. struct VidMatConfigData_t
  19. {
  20. char szFileName[MAX_PATH];
  21. char szPathID[64];
  22. KeyValues *pConfigKeys;
  23. int nVendorID;
  24. int nDeviceID;
  25. int nDXLevel;
  26. unsigned int nSystemMemory;
  27. unsigned int nVideoMemory;
  28. int nPhysicalScreenWidth;
  29. int nPhysicalScreenHeight;
  30. CUtlVector< ShaderDisplayMode_t > displayModes;
  31. bool bIsVideo;
  32. };
  33. enum CPULevel_t
  34. {
  35. CPU_LEVEL_UNKNOWN = -1,
  36. CPU_LEVEL_LOW = 0,
  37. CPU_LEVEL_MEDIUM,
  38. CPU_LEVEL_HIGH,
  39. CPU_LEVEL_PC_COUNT,
  40. CPU_LEVEL_360 = CPU_LEVEL_PC_COUNT,
  41. CPU_LEVEL_PS3 = CPU_LEVEL_360 + 1,
  42. CPU_LEVEL_COUNT,
  43. CPU_LEVEL_BIT_COUNT = 3,
  44. };
  45. enum GPULevel_t
  46. {
  47. GPU_LEVEL_UNKNOWN = -1,
  48. GPU_LEVEL_LOW = 0,
  49. GPU_LEVEL_MEDIUM,
  50. GPU_LEVEL_HIGH,
  51. GPU_LEVEL_VERYHIGH,
  52. GPU_LEVEL_PC_COUNT,
  53. GPU_LEVEL_360 = GPU_LEVEL_PC_COUNT,
  54. GPU_LEVEL_PS3 = GPU_LEVEL_360 + 1,
  55. GPU_LEVEL_COUNT,
  56. GPU_LEVEL_BIT_COUNT = 3,
  57. };
  58. enum MemLevel_t
  59. {
  60. MEM_LEVEL_UNKNOWN = -1,
  61. MEM_LEVEL_LOW = 0,
  62. MEM_LEVEL_MEDIUM,
  63. MEM_LEVEL_HIGH,
  64. MEM_LEVEL_PC_COUNT,
  65. MEM_LEVEL_360 = MEM_LEVEL_PC_COUNT,
  66. MEM_LEVEL_PS3 = MEM_LEVEL_360 + 1,
  67. MEM_LEVEL_COUNT,
  68. MEM_LEVEL_BIT_COUNT = 3,
  69. };
  70. enum GPUMemLevel_t
  71. {
  72. GPU_MEM_LEVEL_UNKNOWN = -1,
  73. GPU_MEM_LEVEL_LOW = 0,
  74. GPU_MEM_LEVEL_MEDIUM,
  75. GPU_MEM_LEVEL_HIGH,
  76. GPU_MEM_LEVEL_PC_COUNT,
  77. GPU_MEM_LEVEL_360 = GPU_MEM_LEVEL_PC_COUNT,
  78. GPU_MEM_LEVEL_PS3 = GPU_MEM_LEVEL_360 + 1,
  79. GPU_MEM_LEVEL_COUNT,
  80. GPU_MEM_LEVEL_BIT_COUNT = 3,
  81. };
  82. bool RecommendedConfig( VidMatConfigData_t &configData );
  83. bool ResetVideoConfigToDefaults( KeyValues *pConfigKeys = NULL );
  84. bool UpdateVideoConfigConVars( KeyValues *pConfigKeys = NULL );
  85. bool ReadCurrentVideoConfig( KeyValues *pConfigKeys, bool bDefault = false );
  86. bool UpdateCurrentVideoConfig( int nWidth, int nHeight, int nAspectRatioMode, bool bFullscreen, bool bNoWindowBorder, bool bUseRestartConvars = false );
  87. void UpdateSystemLevel( int nCPULevel, int nGPULevel, int nMemLevel, int nGPUMemLevel, bool bVGUIIsSplitscreen, const char *pModName );
  88. #endif // VIDEOCFG_H