File sdrpp-set-ressource-path.patch of Package sdrpp-git

diff --git a/core/src/core.cpp b/core/src/core.cpp
index a567ad3..1755a79 100644
--- a/core/src/core.cpp
+++ b/core/src/core.cpp
@@ -157,7 +157,7 @@ int sdrpp_main(int argc, char *argv[]) {
 
     // Load app icon
     GLFWimage icons[10];
-    icons[0].pixels = stbi_load(((std::string)(options::opts.root + "/res/icons/sdrpp.png")).c_str(), &icons[0].width, &icons[0].height, 0, 4);
+    icons[0].pixels = stbi_load(((std::string)("/usr/share/sdrpp/icons/sdrpp.png")).c_str(), &icons[0].width, &icons[0].height, 0, 4);
     icons[1].pixels = (unsigned char*)malloc(16 * 16 * 4); icons[1].width = icons[1].height = 16;
     icons[2].pixels = (unsigned char*)malloc(24 * 24 * 4); icons[2].width = icons[2].height = 24;
     icons[3].pixels = (unsigned char*)malloc(32 * 32 * 4); icons[3].width = icons[3].height = 32;
diff --git a/core/src/gui/icons.cpp b/core/src/gui/icons.cpp
index a2f0f97..cd42a91 100644
--- a/core/src/gui/icons.cpp
+++ b/core/src/gui/icons.cpp
@@ -32,13 +32,13 @@ namespace icons {
     }
 
     void load() {
-        LOGO = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/sdrpp.png");
-        PLAY = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/play.png");
-        STOP = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/stop.png");
-        MENU = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/menu.png");
-        MUTED = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/muted.png");
-        UNMUTED = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/unmuted.png");
-        NORMAL_TUNING = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/normal_tuning.png");
-        CENTER_TUNING = (ImTextureID)(uintptr_t)loadTexture(options::opts.root + "/res/icons/center_tuning.png");
+        LOGO = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/sdrpp.png");
+        PLAY = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/play.png");
+        STOP = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/stop.png");
+        MENU = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/menu.png");
+        MUTED = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/muted.png");
+        UNMUTED = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/unmuted.png");
+        NORMAL_TUNING = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/normal_tuning.png");
+        CENTER_TUNING = (ImTextureID)(uintptr_t)loadTexture("/usr/share/sdrpp/icons/center_tuning.png");
     }
-}
\ No newline at end of file
+}
diff --git a/core/src/gui/style.cpp b/core/src/gui/style.cpp
index 35fbca8..c8c3c5f 100644
--- a/core/src/gui/style.cpp
+++ b/core/src/gui/style.cpp
@@ -17,9 +17,9 @@ namespace style {
         ImGui::GetStyle().PopupRounding = 0.0f;
         ImGui::GetStyle().ScrollbarRounding = 0.0f;
 
-        baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)(options::opts.root + "/res/fonts/Roboto-Medium.ttf")).c_str(), 16.0f);
-        bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)(options::opts.root + "/res/fonts/Roboto-Medium.ttf")).c_str(), 42.0f);
-        hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)(options::opts.root + "/res/fonts/Roboto-Medium.ttf")).c_str(), 128.0f);
+        baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)("/usr/share/fonts/truetype/Roboto-Medium.ttf")).c_str(), 16.0f);
+        bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)("/usr/share/fonts/truetype/Roboto-Medium.ttf")).c_str(), 42.0f);
+        hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)("/usr/share/fonts/truetype/Roboto-Medium.ttf")).c_str(), 128.0f);
 
         ImGui::StyleColorsDark();
         //ImGui::StyleColorsLight();
@@ -37,9 +37,9 @@ namespace style {
         ImGui::GetStyle().PopupRounding = 0.0f;
         ImGui::GetStyle().ScrollbarRounding = 0.0f;
 
-        baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)(options::opts.root + "/res/fonts/Roboto-Medium.ttf")).c_str(), 16.0f);
-        bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)(options::opts.root + "/res/fonts/Roboto-Medium.ttf")).c_str(), 42.0f);
-        hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)(options::opts.root + "/res/fonts/Roboto-Medium.ttf")).c_str(), 128.0f);
+        baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)("/usr/share/fonts/truetype/Roboto-Medium.ttf")).c_str(), 16.0f);
+        bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)("/usr/share/fonts/truetype/Roboto-Medium.ttf")).c_str(), 42.0f);
+        hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(((std::string)("/usr/share/fonts/truetype/Roboto-Medium.ttf")).c_str(), 128.0f);
 
         ImGui::StyleColorsDark();
 
@@ -102,4 +102,4 @@ namespace style {
         ImGui::PopItemFlag();
         ImGui::PopStyleColor(3);
     }
-}
\ No newline at end of file
+}
openSUSE Build Service is sponsored by