fix graphics error when super smooth added - #41
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request attempts to add support for "Super Smooth" as a new graphics quality option for PUBG Mobile. The PR shifts all hex value mappings for graphics settings to accommodate the new option, changes a file path to use a raw string literal, and adds a status message after GameLoop connection.
Changes:
- Added "Super Smooth" to graphics quality mappings with hex value
b'\x01', shifting all other settings up by one - Added a status message after successful GameLoop connection
- Changed file path string to raw string literal for better Windows path handling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/gfx.py | Added status message after GameLoop connection |
| src/app_functions.py | Updated graphics quality mappings to include "Super Smooth" and fixed file path to use raw string |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.ui.pubgchoose_btn.clicked.connect(self.use_pubg_version) | ||
| return | ||
| self.ui.connect_gameloop_btn.setEnabled(True) | ||
| self.app.show_status_message("Connected! Please restart the gameloop.", 5) |
There was a problem hiding this comment.
Inconsistent capitalization of "GameLoop". The new message uses "gameloop" (lowercase), but existing messages in the same file use "GameLoop" (capitalized) at lines 159-160. For consistency, this should be changed to "Connected! Please restart the GameLoop."
| self.app.show_status_message("Connected! Please restart the gameloop.", 5) | |
| self.app.show_status_message("Connected! Please restart the GameLoop.", 5) |
| b'\x01': "Super Smooth", | ||
| b'\x02': "Smooth", | ||
| b'\x03': "Balanced", | ||
| b'\x04': "HD", | ||
| b'\x05': "HDR", | ||
| b'\x06': "Ultra HD" |
There was a problem hiding this comment.
The addition of "Super Smooth" as b'\x01' shifts all other graphics settings by one hex value. However, the UI (src/ui.py:939) still labels smooth_graphics_btn as "Smooth", not "Super Smooth". Additionally, there is no super_smooth_graphics_btn in the UI. This means when get_graphics_setting returns "Super Smooth", it won't match any button text in the button matching logic at src/gfx.py:192-193, causing the wrong button to be selected or no button to be selected at all. The UI needs to be updated to either add a new "Super Smooth" button or relabel the existing smooth_graphics_btn.
| b'\x01': "Super Smooth", | |
| b'\x02': "Smooth", | |
| b'\x03': "Balanced", | |
| b'\x04': "HD", | |
| b'\x05': "HDR", | |
| b'\x06': "Ultra HD" | |
| b'\x01': "Smooth", | |
| b'\x02': "Balanced", | |
| b'\x03': "HD", | |
| b'\x04': "HDR", | |
| b'\x05': "Ultra HD", |
| "Super Smooth": b'\x01', | ||
| "Smooth": b'\x02', | ||
| "Balanced": b'\x03', | ||
| "HD": b'\x04', | ||
| "HDR": b'\x05', | ||
| "Ultra HD": b'\x06' | ||
| } | ||
|
|
There was a problem hiding this comment.
The graphics_setting dictionary maps "Super Smooth" to b'\x01', which shifts all other settings by one hex value. However, the graphics_buttons list in src/gfx.py (lines 182-188) only contains 5 buttons: smooth_graphics_btn, balanced_graphics_btn, hd_graphics_btn, hdr_graphics_btn, and ultrahd_graphics_btn. There is no super_smooth_graphics_btn, meaning the new "Super Smooth" quality cannot be selected by users. Either a new UI button needs to be added, or the existing smooth_graphics_btn should be relabeled to "Super Smooth".
| "Super Smooth": b'\x01', | |
| "Smooth": b'\x02', | |
| "Balanced": b'\x03', | |
| "HD": b'\x04', | |
| "HDR": b'\x05', | |
| "Ultra HD": b'\x06' | |
| } | |
| "Smooth": b'\x01', | |
| "Balanced": b'\x02', | |
| "HD": b'\x03', | |
| "HDR": b'\x04', | |
| "Ultra HD": b'\x05' | |
| } |
fixes #37 #36