Skip to content

Commit

Permalink
Remove more hardcoded translation
Browse files Browse the repository at this point in the history
  • Loading branch information
ClassicOldSong committed Jul 12, 2024
1 parent d4277d3 commit 7a32845
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import android.util.Range;
import android.view.Choreographer;
import android.view.Surface;
import android.view.SurfaceHolder;

public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements Choreographer.FrameCallback {

Expand Down Expand Up @@ -1453,7 +1452,7 @@ public int submitDecodeUnit(byte[] decodeUnitData, int decodeUnitLength, int dec
if(TrafficStatsHelper.getPackageRxBytes(Process.myUid())!= TrafficStats.UNSUPPORTED){
long netData=TrafficStatsHelper.getPackageRxBytes(Process.myUid())+TrafficStatsHelper.getPackageTxBytes(Process.myUid());
if(lastNetDataNum!=0){
sb.append("带宽:");
sb.append(context.getString(R.string.perf_overlay_lite_bandwidth) + ": ");
float realtimeNetData=(netData-lastNetDataNum)/1024f;
if(realtimeNetData>=1000){
sb.append(String.format("%.2f", realtimeNetData/1024f) +"M/s\t ");
Expand All @@ -1465,11 +1464,12 @@ public int submitDecodeUnit(byte[] decodeUnitData, int decodeUnitLength, int dec
}
// sb.append("分辨率:");
// sb.append(initialWidth + "x" + initialHeight);
sb.append("延迟/解码:");
sb.append(context.getString(R.string.perf_overlay_lite_network_decoding_delay) + ": ");
sb.append(context.getString(R.string.perf_overlay_lite_net,(int)(rttInfo >> 32)));
sb.append(" / ");
sb.append(context.getString(R.string.perf_overlay_lite_dectime,decodeTimeMs));
sb.append("\t 丢包率:");
sb.append("\t");
sb.append(context.getString(R.string.perf_overlay_lite_packet_loss) + ": ");
sb.append(context.getString(R.string.perf_overlay_lite_netdrops,(float)lastTwo.framesLost / lastTwo.totalFrames * 100));
sb.append("\t FPS:");
sb.append(context.getString(R.string.perf_overlay_lite_fps,fps.totalFps));
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,7 @@
<string name="game_menu_send_keys_alt_enter">发送 Alt + Enter</string>
<string name="game_menu_send_keys_ctrl_alt_shift_f12">发送 Ctrl+Alt+Shift+F12 (切换显示器)</string>
<string name="summary_back_as_meta">在按下物理返回键时发送 Meta(Win) 键</string>
<string name="perf_overlay_lite_bandwidth">带宽</string>
<string name="perf_overlay_lite_network_decoding_delay">网络/解码延迟</string>
<string name="perf_overlay_lite_packet_loss">丢包率</string>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@
<string name="summary_checkbox_force_qwerty">Force use QWERTY keyboard layout. Required by GFE. Turn off if you want to use a different keyboard layout.</string>
<string name="title_checkbox_back_as_meta">Back button as Meta</string>
<string name="summary_back_as_meta">Send Meta(Win) key on physical back button press.</string>
<string name="perf_overlay_lite_bandwidth">Bandwidth</string>
<string name="perf_overlay_lite_network_decoding_delay">Network/Decoding delay</string>
<string name="perf_overlay_lite_packet_loss">Packet loss</string>

</resources>

0 comments on commit 7a32845

Please sign in to comment.