<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Android/jni/AndroidCommon/AndroidCommon.cpp, branch release-prep-2503</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>Simplify `std::remove` with `std::erase`</title>
<updated>2024-10-18T01:38:34+00:00</updated>
<author>
<name>mitaclaw</name>
<email>140017135+mitaclaw@users.noreply.github.com</email>
</author>
<published>2024-09-29T03:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=be0b13da97121d9ca1b1d454cf3a36bcccb5173b'/>
<id>be0b13da97121d9ca1b1d454cf3a36bcccb5173b</id>
<content type='text'>
`std::erase` is a replacement for the remove-erase idiom.

Changes to `OpenModeToAndroid` inadvertently revealed that the prior implementation had UB (potentially deleting the end iterator). This is now fixed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`std::erase` is a replacement for the remove-erase idiom.

Changes to `OpenModeToAndroid` inadvertently revealed that the prior implementation had UB (potentially deleting the end iterator). This is now fixed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Translate C++ "w" to ParcelFileDescriptor "wt"</title>
<updated>2023-03-18T12:44:01+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2023-03-18T12:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=8e363c099506913f2add4fef9b60c51587052623'/>
<id>8e363c099506913f2add4fef9b60c51587052623</id>
<content type='text'>
Previously we were translating "w" to "w", which unlike in C++ doesn't
truncate. See https://issuetracker.google.com/issues/180526528, and for
reference, https://en.cppreference.com/w/cpp/io/c/fopen and
https://en.cppreference.com/w/cpp/io/basic_filebuf/open.

This issue was brought to my attention by the recently published issue
CVE-2023-21036 in the screenshot editing tool on Pixel phones. I'm not
aware of any code in Dolphin that actually uses "w" with an existing
file on Android (when we ask the user for a location to save to using
SAF, a new file is always created), but still, best to fix this.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously we were translating "w" to "w", which unlike in C++ doesn't
truncate. See https://issuetracker.google.com/issues/180526528, and for
reference, https://en.cppreference.com/w/cpp/io/c/fopen and
https://en.cppreference.com/w/cpp/io/basic_filebuf/open.

This issue was brought to my attention by the recently published issue
CVE-2023-21036 in the screenshot editing tool on Pixel phones. I'm not
aware of any code in Dolphin that actually uses "w" with an existing
file on Android (when we ask the user for a location to save to using
SAF, a new file is always created), but still, best to fix this.
</pre>
</div>
</content>
</entry>
<entry>
<title>AndroidCommon: Make use of std::string_view where applicable</title>
<updated>2023-01-30T18:30:52+00:00</updated>
<author>
<name>Lioncash</name>
<email>mai.iam2048@gmail.com</email>
</author>
<published>2023-01-30T18:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=5c1954c84384a5965c9d718bc43ca1fb96ad946b'/>
<id>5c1954c84384a5965c9d718bc43ca1fb96ad946b</id>
<content type='text'>
Several of these can take a string_view rather than needing to
specifically use std::string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several of these can take a string_view rather than needing to
specifically use std::string.
</pre>
</div>
</content>
</entry>
<entry>
<title>Common: Replace StringBeginsWith/StringEndsWith with std equivalents</title>
<updated>2023-01-24T19:58:20+00:00</updated>
<author>
<name>Lioncash</name>
<email>mai.iam2048@gmail.com</email>
</author>
<published>2023-01-24T19:25:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e5b91f00b0688d5cba6870da6d6ad3300097b07f'/>
<id>e5b91f00b0688d5cba6870da6d6ad3300097b07f</id>
<content type='text'>
Obsoletes these functions in favor of the standard member functions
added in C++20.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Obsoletes these functions in favor of the standard member functions
added in C++20.
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Add VectorToJObjectArray utility function</title>
<updated>2022-12-27T21:59:42+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2022-12-27T21:28:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=b3a368ae06c5f82afdd617355afba388c90d19e8'/>
<id>b3a368ae06c5f82afdd617355afba388c90d19e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Make more meticulous use of DeleteLocalRef</title>
<updated>2022-12-27T21:03:44+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2022-12-25T15:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=0b9351c194c8451576b183971e363ceaf658a448'/>
<id>0b9351c194c8451576b183971e363ceaf658a448</id>
<content type='text'>
If we're in a function that isn't just going to immediately return to
Java, leaking local references can lead to problems eventually.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we're in a function that isn't just going to immediately return to
Java, leaking local references can lead to problems eventually.
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Improve OpenModeToAndroid's handling of 'b'</title>
<updated>2021-10-13T15:39:09+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2021-10-13T15:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=b28e5149a75e8f35d0a8b464acbe5e8fbc6ed6dd'/>
<id>b28e5149a75e8f35d0a8b464acbe5e8fbc6ed6dd</id>
<content type='text'>
Now it also works when b isn't at the very end. (+ goes after b.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now it also works when b isn't at the very end. (+ goes after b.)
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert GPLv2+ license info to SPDX tags</title>
<updated>2021-07-05T02:35:56+00:00</updated>
<author>
<name>Pierre Bourdon</name>
<email>delroth@gmail.com</email>
</author>
<published>2021-07-05T01:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e149ad4f0a9874f354221a7fc76d8f1841e47808'/>
<id>e149ad4f0a9874f354221a7fc76d8f1841e47808</id>
<content type='text'>
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Use DeleteLocalRef more in AndroidCommon</title>
<updated>2021-05-24T20:01:49+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2021-05-24T20:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=c1c17339ff8c40f880fb71a5e9c540cd56252518'/>
<id>c1c17339ff8c40f880fb71a5e9c540cd56252518</id>
<content type='text'>
Any local references get cleaned up when returning to the JVM,
but some of the functions in AndroidCommon return to C++ rather
than the JVM, and functions with loops risk running into the
limit of how many simultaneous local references are allowed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any local references get cleaned up when returning to the JVM,
but some of the functions in AndroidCommon return to C++ rather
than the JVM, and functions with loops risk running into the
limit of how many simultaneous local references are allowed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Android: Use JNI for getting post-processsing shaders</title>
<updated>2021-05-20T14:43:03+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2021-05-20T14:34:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=b7ba126db0d796348ba884333b341e50252433ad'/>
<id>b7ba126db0d796348ba884333b341e50252433ad</id>
<content type='text'>
The Java implementation of getting the list of post-processing
shaders only looked in the Sys folder and not the User folder.
This could be fixed in the Java implementation, but it's
simpler to just call the C++ implementation instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Java implementation of getting the list of post-processing
shaders only looked in the Sys folder and not the User folder.
This could be fixed in the Java implementation, but it's
simpler to just call the C++ implementation instead.
</pre>
</div>
</content>
</entry>
</feed>
