fix: device number not starting with 0 - #47
Conversation
| } | ||
| pclose(fupppath); | ||
| void set_upp_path(app_widgets *widgets) { | ||
| snprintf(upppath, sizeof(upppath), "%s/.local/bin/venv/bin/upp", getenv("HOME")); |
There was a problem hiding this comment.
This breaks my setup by not finding the executable.
|
By using a work-around for the actual filepath for UPP, everything loads as expected and my options are not greyed out after selecting the card in the dropdow. |
|
I used |
|
This patch fixed the application, on my 6900xt system. I did, however, need to revert the hunk Pipshag mentioned above. I've attached the diff below for anyone else who runs into this issue. diff --git a/src/main.c b/src/main.c
index f720885..d0f141f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -661,8 +661,21 @@ void get_home_path(app_widgets *widgets) {
}
void set_upp_path(app_widgets *widgets) {
- snprintf(upppath, sizeof(upppath), "%s/.local/bin/venv/bin/upp", getenv("HOME"));
- printf("UPP path is %s\n", upppath);
+ FILE *fupppath = popen("which upp", "r");
+ if (fupppath) {
+ if (fgets(upppath, sizeof(upppath), fupppath)){
+ size_t len = strlen(upppath);
+ if (len > 0 && upppath[len-1] == '\n') {
+ upppath[--len] = '\0';
+ }
+ printf("UPP path is %s\n", upppath);
+ }
+ else {
+ gtk_text_buffer_set_text(GTK_TEXT_BUFFER(g_text_revealer), "UPP module not found, install with pip", -1);
+ gtk_revealer_set_reveal_child (GTK_REVEALER(widgets->g_revealer), TRUE);
+ }
+ }
+ pclose(fupppath);
}
void unsupported_amd(int num) { |
Thanks a lot, this fixed it on my RX 6700 XT :) |
No description provided.