Skip to content

Commit

Permalink
Wayland Display: Enabling Wayland display based on Environment Variable
Browse files Browse the repository at this point in the history
Adding return to bool resolves the rdkshell crash issue when compiled
with gcc 9.0 or higher.rdkcentral#54
Enabling wayland display when environment variable WAYLAND_DISPLAY is
set otherwise it will use direct.

Signed-off-by: balav08 <[email protected]>
  • Loading branch information
balaji-86 committed Jan 8, 2021
1 parent 618683b commit 9e046b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions compositorcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ namespace RdkShell
gSplashImage->draw();
}
}
return true;
}

bool CompositorController::addAnimation(const std::string& client, double duration, std::map<std::string, RdkShellData> &animationProperties)
Expand Down
10 changes: 7 additions & 3 deletions rdkshell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,21 +295,25 @@ namespace RdkShell
}
#endif

bool Iswayland = false;
char const *disp = getenv("WAYLAND_DISPLAY");
if (disp != 0) {
Iswayland = true; }
#ifdef RDKSHELL_ENABLE_FORCE_1080
std::ifstream file720("/tmp/rdkshell720");
if (file720.good())
{
std::cout << "!!!!! forcing 720 start!\n";
RdkShell::EssosInstance::instance()->initialize(false, 1280, 720);
RdkShell::EssosInstance::instance()->initialize(Iswayland, 1280, 720);
gForce720 = true;
}
else
{
std::cout << "!!!!! forcing 1080 start!\n";
RdkShell::EssosInstance::instance()->initialize(false, 1920, 1080);
RdkShell::EssosInstance::instance()->initialize(Iswayland, 1920, 1080);
}
#else
RdkShell::EssosInstance::instance()->initialize(false);
RdkShell::EssosInstance::instance()->initialize(Iswayland);
#endif //RDKSHELL_ENABLE_FORCE_1080
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
Expand Down

0 comments on commit 9e046b1

Please sign in to comment.