-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor optimize, code refactor and C++17 make_unique #2097
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, thank you! Only a few small things to modify.
@@ -505,6 +505,7 @@ void upload_bound_texture(const TextureCacheState &cache, const SceGxmTexture &g | |||
case SCE_GXM_TEXTURE_CUBE_ARBITRARY: | |||
width = next_power_of_two(width); | |||
height = next_power_of_two(height); | |||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This break is not needed and will break the graphics of some games (if the texture type is arbitrary adjust the width and the height, then do like the others).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vita3k/gui/src/gui.cpp
Outdated
@@ -534,7 +534,7 @@ void get_user_apps_title(GuiState &gui, EmuEnvState &emuenv) { | |||
|
|||
void get_sys_apps_title(GuiState &gui, EmuEnvState &emuenv) { | |||
gui.app_selector.sys_apps.clear(); | |||
const std::vector<std::string> sys_apps_list = { "NPXS10003", "NPXS10008", "NPXS10015", "NPXS10026" }; | |||
const std::array<std::string, 4> sys_apps_list = { "NPXS10003", "NPXS10008", "NPXS10015", "NPXS10026" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can even make this constexpr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is proleme with vector ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0615322
to
4ea6b52
Compare
@Zangetsu38 fix it 4ea6b52 |
LGTM |
Please, rebase it on master. |
Sorry, I did not explain. I mean master of this repo. Commands to do it are something like this (not checked)
|
for (const auto &app : sys_apps_list) { | ||
vfs::FileBuffer params; | ||
if (vfs::read_file(VitaIoDevice::vs0, params, emuenv.pref_path, "app/" + app + "/sce_sys/param.sfo")) { | ||
if (vfs::read_file(VitaIoDevice::vs0, params, emuenv.pref_path, std::string("app/") + app + "/sce_sys/param.sfo")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string(...)
specified for app/
but not for /sce_sys/param.sfo
?
@@ -46,7 +46,7 @@ struct FileInfo { | |||
int access_mode; | |||
|
|||
FileInfo() | |||
: vita_loc("") | |||
: vita_loc() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed at all if empty.
#3274 already merged |
@Macdu Hi, review PR changes for readability and minor optimization.
I think you'll like it.