Skip to content

Commit

Permalink
GpuTableEditor: Add support for editing cx-level conveniently
Browse files Browse the repository at this point in the history
  • Loading branch information
libxzr committed Feb 22, 2023
1 parent 2b7436c commit dc7a27a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/src/main/java/xzr/konabess/GpuTableEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ public static void writeOut(List<String> new_dts) throws IOException {
}

private static String generateSubtitle(String line) throws Exception {
if (DtsHelper.decode_hex_line(line).name.equals("qcom,level")) {
String raw_name = DtsHelper.decode_hex_line(line).name;
if ("qcom,level".equals(raw_name) || "qcom,cx-level".equals(raw_name)) {
return GpuVoltEditor.levelint2str(DtsHelper.decode_int_line(line).value);
}
return DtsHelper.shouldUseHex(line) ? DtsHelper.decode_hex_line(line).value : DtsHelper.decode_int_line(line).value + "";
Expand Down Expand Up @@ -306,7 +307,7 @@ public void onBackPressed() {
? DtsHelper.decode_hex_line(bins.get(last).levels.get(levelid).lines.get(position - 1)).value
: DtsHelper.decode_int_line(bins.get(last).levels.get(levelid).lines.get(position - 1)).value + "";

if (raw_name.equals("qcom,level")) {
if (raw_name.equals("qcom,level") || raw_name.equals("qcom,cx-level")) {
try {
Spinner spinner = new Spinner(activity);
spinner.setAdapter(new ArrayAdapter(activity, android.R.layout.simple_dropdown_item_1line, ChipInfo.rpmh_levels.level_str()));
Expand Down

0 comments on commit dc7a27a

Please sign in to comment.