Skip to content
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

cellImeJp: fix regression #12677

Merged
merged 2 commits into from
Sep 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions rpcs3/Emu/Cell/Modules/cellImeJp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,17 @@ bool ime_jp_manager::addChar(u16 c)
if (!c || cursor >= (CELL_IMEJP_STRING_MAXLENGTH - 1) || cursor > input_string.length())
return false;

input_string += c; // resize
std::memmove(input_string.data() + cursor + 1, input_string.data() + cursor, sizeof(u16) * (input_string.size() - 1 - cursor));
cursor_end = ++cursor;
std::u16string tmp;
tmp += c;
#if defined(__GNUG__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wrestrict"
#endif
input_string.insert(cursor++, tmp);
#if defined(__GNUG__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
cursor_end = cursor;
input_state = CELL_IMEJP_BEFORE_CONVERT;
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Common/surface_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ namespace rsx
ensure(dst_offset.x < child_w && dst_offset.y < child_h);

// TODO: Eventually need to stack all the overlapping regions, but for now just do the latest rect in the space
deferred_clipped_region<T*> region;
deferred_clipped_region<T*> region{};
region.src_x = src_offset.x;
region.src_y = src_offset.y;
region.dst_x = dst_offset.x;
Expand Down