Skip to content

Commit 572d7b3

Browse files
committed
fix: buttons not shwon in mini mode on arm64 platform
Change-Id: I3d59324735094b105db4f7a521708bd149aa88c6
1 parent 9525d38 commit 572d7b3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/libdmr/compositing_manager.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ class PlatformChecker {
8484
} else if (machine.find("mips") != string::npos) { // loongson
8585
qDebug() << "match loongson";
8686
_pf = Platform::Alpha;
87+
} else if (machine.find("aarch64") != string::npos) { // ARM64
88+
qDebug() << "match arm";
89+
_pf = Platform::Arm64;
8790
}
8891
}
8992
}
@@ -120,7 +123,7 @@ CompositingManager::CompositingManager() {
120123
if (GetScreenDriver) {
121124
const char *name = (*GetScreenDriver) (QX11Info::display(), QX11Info::appScreen());
122125
qDebug() << "dri driver: " << name;
123-
_composited = name != NULL;
126+
_composited = name != nullptr;
124127
} else {
125128
if (isDriverLoadedCorrectly() && isDirectRendered()) {
126129
_composited = true;
@@ -305,7 +308,7 @@ bool CompositingManager::is_device_viable(int id) {
305308
bool CompositingManager::isProprietaryDriver()
306309
{
307310
if (is_device_viable(0)) {
308-
vector<string> drivers = {"nvidia", "fglrx"};
311+
vector<string> drivers = {"nvidia", "fglrx", "hibmc-drm"};
309312
return is_card_exists(drivers);
310313
}
311314

@@ -378,9 +381,9 @@ PlayerOptionList CompositingManager::getBestProfile()
378381
switch (_platform) {
379382
case Platform::Alpha:
380383
case Platform::Mips:
384+
case Platform::Arm64:
381385
profile_name = _composited ? "composited" : "failsafe";
382386
break;
383-
384387
case Platform::X86:
385388
profile_name = _composited ? "composited" : "default";
386389
break;

src/libdmr/compositing_manager.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ enum Platform {
4040
Unknown,
4141
X86, // intel & amd
4242
Mips, // loongson
43-
Alpha // sunway
43+
Alpha, // sunway
44+
Arm64
4445
};
4546

4647
enum OpenGLInteropKind {

0 commit comments

Comments
 (0)