Browse Source

display: make refresh_rate float, deprecate get_display_mode_xyz

rdb 2 years ago
parent
commit
7c3e660b15

+ 6 - 6
panda/src/display/displayInformation.cxx

@@ -210,7 +210,7 @@ get_display_mode(int display_index) {
 }
 
 /**
- *
+ * @deprecated use get_display_mode instead.
  */
 int DisplayInformation::
 get_display_mode_width (int display_index) {
@@ -225,7 +225,7 @@ get_display_mode_width (int display_index) {
 }
 
 /**
- *
+ * @deprecated use get_display_mode instead.
  */
 int DisplayInformation::
 get_display_mode_height (int display_index) {
@@ -240,7 +240,7 @@ get_display_mode_height (int display_index) {
 }
 
 /**
- *
+ * @deprecated use get_display_mode instead.
  */
 int DisplayInformation::
 get_display_mode_bits_per_pixel (int display_index) {
@@ -255,9 +255,9 @@ get_display_mode_bits_per_pixel (int display_index) {
 }
 
 /**
- *
+ * @deprecated use get_display_mode instead.
  */
-int DisplayInformation::
+double DisplayInformation::
 get_display_mode_refresh_rate (int display_index) {
   int value;
 
@@ -270,7 +270,7 @@ get_display_mode_refresh_rate (int display_index) {
 }
 
 /**
- *
+ * @deprecated use get_display_mode instead.
  */
 int DisplayInformation::
 get_display_mode_fullscreen_only (int display_index) {

+ 2 - 2
panda/src/display/displayInformation.h

@@ -21,7 +21,7 @@ PUBLISHED:
   int width;
   int height;
   int bits_per_pixel;
-  int refresh_rate;
+  double refresh_rate;
   int fullscreen_only;
 
   bool operator == (const DisplayMode &other) const;
@@ -60,7 +60,7 @@ PUBLISHED:
   int get_display_mode_width(int display_index);
   int get_display_mode_height(int display_index);
   int get_display_mode_bits_per_pixel(int display_index);
-  int get_display_mode_refresh_rate(int display_index);
+  double get_display_mode_refresh_rate(int display_index);
   int get_display_mode_fullscreen_only(int display_index);
 
   GraphicsStateGuardian::ShaderModel get_shader_model();