Advertisement
svenhoefer

Untitled

Mar 7th, 2020
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.00 KB | None | 0 0
  1. diff --git a/src/gui/osd_helpers.cpp b/src/gui/osd_helpers.cpp
  2. index 1550771..fd1f1aa 100644
  3. --- a/src/gui/osd_helpers.cpp
  4. +++ b/src/gui/osd_helpers.cpp
  5. @@ -63,12 +63,10 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo
  6.  
  7.     if ((g_settings.video_Mode == VIDEO_STD_AUTO) &&
  8.         (g_settings.enabled_auto_modes[videoSystem] == 1) &&
  9. -       (!isVideoSystem1080(videoSystem)))
  10. +       (!isVideoSystem1080(videoSystem)) &&
  11. +       (!isVideoSystem2160(videoSystem)))
  12.         modeNew = OSDMODE_720;
  13.  
  14. -// if (!isVideoSystem1080(videoSystem))
  15. -//     modeNew = OSDMODE_720;
  16. -
  17.     idx = frameBuffer->getIndexOsdResolution(modeNew);
  18.     resetOsd = (modeNew != getOsdResolution()) ? true : false;
  19.  #if 1
  20. @@ -148,11 +146,7 @@ int COsdHelpers::isVideoSystem1080(int res)
  21.         (res == VIDEO_STD_1080P50) ||
  22.         (res == VIDEO_STD_1080P60) ||
  23.         (res == VIDEO_STD_1080P2397) ||
  24. -       (res == VIDEO_STD_1080P2997) ||
  25. -       (res == VIDEO_STD_2160P24) ||
  26. -       (res == VIDEO_STD_2160P25) ||
  27. -       (res == VIDEO_STD_2160P30) ||
  28. -       (res == VIDEO_STD_2160P50))
  29. +       (res == VIDEO_STD_1080P2997))
  30.         return true;
  31.  #if 0
  32.     /* for testing only */
  33. @@ -163,6 +157,17 @@ int COsdHelpers::isVideoSystem1080(int res)
  34.     return false;
  35.  }
  36.  
  37. +int COsdHelpers::isVideoSystem2160(int res)
  38. +{
  39. +   if ((res == VIDEO_STD_2160P24) ||
  40. +       (res == VIDEO_STD_2160P25) ||
  41. +       (res == VIDEO_STD_2160P30) ||
  42. +       (res == VIDEO_STD_2160P50))
  43. +       return true;
  44. +
  45. +   return false;
  46. +}
  47. +
  48.  int COsdHelpers::getVideoSystem()
  49.  {
  50.     return videoDecoder->GetVideoSystem();
  51. diff --git a/src/gui/osd_helpers.h b/src/gui/osd_helpers.h
  52. index e86b1df..728bbf3 100644
  53. --- a/src/gui/osd_helpers.h
  54. +++ b/src/gui/osd_helpers.h
  55. @@ -22,6 +22,7 @@ class COsdHelpers : public sigc::trackable
  56.  
  57.         void changeOsdResolution(uint32_t mode, bool automode=false, bool forceOsdReset=false);
  58.         int  isVideoSystem1080(int res);
  59. +       int  isVideoSystem2160(int res);
  60.         int  getVideoSystem();
  61.         uint32_t getOsdResolution();
  62.         int setVideoSystem(int newSystem, bool remember = true);
  63. diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp
  64. index 9d8e223..87b5898 100644
  65. --- a/src/gui/osd_setup.cpp
  66. +++ b/src/gui/osd_setup.cpp
  67. @@ -709,9 +709,8 @@ int COsdSetup::showOsdSetup()
  68.         resCount = 1;
  69.     }
  70.     int videoSystem = COsdHelpers::getInstance()->getVideoSystem();
  71. -   bool enable = ((resCount > 1) &&
  72. -           COsdHelpers::getInstance()->isVideoSystem1080(videoSystem) &&
  73. -           (g_settings.video_Mode != VIDEO_STD_AUTO));
  74. +   bool enable = ((resCount > 1) && (g_settings.video_Mode != VIDEO_STD_AUTO) &&
  75. +           (COsdHelpers::getInstance()->isVideoSystem1080(videoSystem) || COsdHelpers::getInstance()->isVideoSystem2160(videoSystem)));
  76.     CMenuOptionChooser * osd_res = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_RESOLUTION, &g_settings.osd_resolution, kext, resCount, enable, this);
  77.     osd_res->OnAfterChangeOption.connect(sigc::mem_fun(frameBuffer->getInstance(), &CFrameBuffer::clearIconCache));
  78.     osd_res->setHint("", LOCALE_MENU_HINT_OSD_RESOLUTION);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement