Compare commits

..

364 Commits

Author SHA1 Message Date
bunnei
dad2146e4e
Merge pull request #171 from nathanlepori/features/dpad-slide-fix
Implemented switch for sliding finger across dpad + fixed sensitivity
2020-07-24 13:19:20 -07:00
bunnei
c2cf108498
Update strings.xml 2020-07-24 16:17:01 -04:00
bunnei
ac592c4be9
Merge pull request #172 from SachinVin/stuff
Minor Stuff
2020-07-24 13:15:07 -07:00
SachinVin
bcace548e9 video_core/CMakeLists.txt: Use toolchain cmake in shader header generator 2020-07-12 21:00:18 +05:30
SachinVin
711089b46b gl_state.cpp: Fix typo in texture buffer LUT 2020-07-12 19:53:35 +05:30
Nathan Lepori
955b51b994 Implemented switch for sliding finger across dpad + fixed sensitivity 2020-07-12 11:11:42 +02:00
SachinVin
bde1fe9f50 android : EmulationActivity: Don't show rationale if the permission was denied indefinitely 2020-06-27 00:24:39 +05:30
bunnei
ecfcbcc9a2
Merge pull request #162 from SachinVin/motion
Disable sensors when emulation is paused
2020-06-22 18:00:52 -04:00
SachinVin
a558ff0152 fix formatting 2020-06-21 17:53:31 +05:30
SachinVin
3d75c14457 android: Disable sensors when emulation is paused 2020-06-21 11:39:58 +05:30
SachinVin
1a4f50d800 android : refactor button_manager{.cpp, .h} to input_manager
Now that it also handles sensors
2020-06-20 15:39:57 +05:30
SutandoTsukai181
3608cb90bb Update framebuffer layout when closing the settings
Fixes an issue where the default layout gets applied when closing the settings, which is noticable if you swap screens before changing the layout.
2020-06-16 15:05:24 -04:00
SutandoTsukai181
e2757f75a5 Add Cardboard VR
Based on hrydgard/ppsspp/pull/12449
2020-06-16 15:05:24 -04:00
SutandoTsukai181
85319462bf Add Stereoscopy settings UI 2020-06-16 15:05:23 -04:00
SachinVin
6ba29bc062 Run clang-format 2020-06-16 15:05:23 -04:00
SutandoTsukai181
0c5f7f8d41 Remove unnecessary conditional 2020-06-16 15:05:23 -04:00
SutandoTsukai181
88a66840ed Wait on present_queue instead of free_queue 2020-06-16 15:05:23 -04:00
SutandoTsukai181
7b0c77c101 Remove reference to "has_custom_button_text" 2020-06-16 15:05:23 -04:00
SutandoTsukai181
232cfc3ffa Properly handle button_text for android 2020-06-16 15:05:22 -04:00
SutandoTsukai181
58480f848e Port "applets/swkbd: Properly handle button_text"
from citra-emu/citra/pull/5381
2020-06-16 15:05:12 -04:00
Tobias
c8e01d29a8 AndroidManifest: Remove the maximum aspect ratio entirely 2020-06-16 15:04:38 -04:00
Tobias
cb26b07f0f AndroidManifest: Increase the maximum aspect ratio
This should help display the app on the whole screen on 21:9 devices like the Experia Z5.
2020-06-16 15:04:37 -04:00
bunnei
7d7eed2a91 gl_shader_decompiler: Improve performance of accurate_mul on Android. 2020-06-16 15:04:37 -04:00
weihuoya
8ebc94d899 presenting in the ui thread 2020-06-16 15:04:37 -04:00
weihuoya
0945c9d5e9 presenting if need 2020-06-16 15:04:37 -04:00
weihuoya
8c0c3baf63 use separate texture buffer for light and fog 2020-06-16 15:04:37 -04:00
zhang wei
4ecb4a22b3 Minor fixes to the UX (#126) 2020-06-16 15:04:36 -04:00
SachinVin
1086333105 Update: dynarmic
Rebase on MerryMage/dynarmic@659d78c
2020-06-16 15:04:36 -04:00
bunnei
95f1cb4187 android: CheckBoxSetting: Fix a ClassCastException exception with isChecked. 2020-06-16 15:04:36 -04:00
bunnei
0589915fe6 android: MainActivity: Fix a nullptr exception with onSaveInstanceState. 2020-06-16 15:04:36 -04:00
bunnei
ae7fc8fb2f android: SettingsFragmentPresenter: Fix a nullptr exception with loadSettingsList. 2020-06-16 15:04:35 -04:00
bunnei
8f7260b4c1 Revert "Presenting in ui thread (#92)"
This reverts commit d1c2e8fb88873bf8642d07ca7e386cc1bac19692.
2020-06-16 15:04:35 -04:00
bunnei
1d3bccdd9a android: native: Reload game specific settings when in game. 2020-06-16 15:04:35 -04:00
zhang wei
97d0a8f0ff Presenting in ui thread (#92)
* present in ui thread

* rm test file

* use gradle 3.6.3

* fx present issue
2020-06-16 15:04:35 -04:00
xperia64
bb6dd1fe42 Disable deptch stencil shader in texture_downloader_es for now 2020-06-16 15:04:34 -04:00
SachinVin
bcfd20e343 android : Fix touchscreen for reals
Adds proper multitouch tracking for touchscreen
2020-06-16 15:04:34 -04:00
SachinVin
cdc6606c02 core/frontend/emu_window: return true when TouchPressed is consumed 2020-06-16 15:04:34 -04:00
xperia64
c27fa394e7 Clamp the circle pad more correctly 2020-06-16 15:04:34 -04:00
xperia64
1c916a0341 Fix the N3DS controls 2020-06-16 15:04:34 -04:00
xperia64
f7d5fd815c Shield TV driver bug workaround 2020-06-16 15:04:33 -04:00
SachinVin
393d3a3887 android : InputOverlayDrawableDpad.java: Initialize mTrackId to -1 2020-06-16 15:04:33 -04:00
SachinVin
12a1a16c6e android: Bring back git hash version name 2020-06-16 15:04:33 -04:00
bunnei
d80038b02e android: game_settings: Mario & Luigi games require accurate mul. 2020-06-16 15:04:33 -04:00
BreadFish64
b4b1b38404 video_core/GLES: fix issues cause by missing glTextureBarrier
create a duplicate for sampling instead
2020-06-16 15:04:33 -04:00
BreadFish64
cb5f1dc554 actually add icons 2020-06-16 15:04:32 -04:00
BreadFish64
9f688b0f0f add icon to CIA install menu item 2020-06-16 15:04:32 -04:00
BreadFish64
76708b8838 refresh game list after installing CIA 2020-06-16 15:04:32 -04:00
BreadFish64
f7fbde3453 android: Add initial CIA installation 2020-06-16 15:04:32 -04:00
bunnei
290aabdb5f android: game_settings: Further cleanups. 2020-06-16 15:04:31 -04:00
bunnei
af3efa2975 android: native: Set game specific settings before initializing core.
- Allows some other settings to be overridden.
2020-06-16 15:04:31 -04:00
bunnei
5cb361111b android: game_settings: Disable asynch GPU with DQ7.
- This was causing some issues.
2020-06-16 15:04:31 -04:00
Nathan Lepori
1379f37875 Implemented joystick-style directional pad overlay 2020-06-16 15:04:31 -04:00
SutandoTsukai181
c514e9028b android: frontend: Start a service to keep the persistent notification 2020-06-16 15:04:31 -04:00
meteoorkip
cd940db10c Make touch joystick re-centering configurable 2020-06-16 15:04:31 -04:00
SachinVin
5d6b270037 gl_shader_gen.cpp:fix implicit type conversion error for gles 2020-06-16 15:04:30 -04:00
SachinVin
5627e04195 android:InputOverlay: Bit mask touch action so they are aevaluated properly
event.getAction() returns the action only in the lower byte, this works fine when the pointer index is zero and any additional indexes are not captured
2020-06-16 15:04:30 -04:00
SutandoTsukai181
c2c64a8098 Use fixed indices for button order
Apps always return 3 strings, even if there is no custom text, so the index should be constant for each button.

The "OK" button is always at index 2.
2020-06-16 15:04:30 -04:00
bunnei
f940aa7497 android: game_settings: Make SM3DL's GPU timing synchronous.
- Fixes reported white screen bug.
2020-06-16 15:04:30 -04:00
bunnei
d9bb3efeb0 android: BillingManager: Purchases must be acknowledged. 2020-06-16 15:04:30 -04:00
FearlessTobi
9965188e87 android: Update app translations
Adds Korean and some minor fixes to other languages.
2020-06-16 15:04:30 -04:00
bunnei
87ade92058 androuid: game_settings: Tighten asynch GPU timing.
- Fixes framerate issues in ZALBW.
2020-06-16 15:04:29 -04:00
SachinVin
c0e31e3de6 android: AndroidManifest.xml: bump up gles requirement to 3.2 2020-06-16 15:04:29 -04:00
SachinVin
b7b40b90c0 android: disable support for split screen 2020-06-16 15:04:29 -04:00
Pengfei Zhu
0d68596c54 audio_core/cubeb_input: Set default value for latency_frames
On Android OpenSL, cubeb could not find the minimum latency. Therefore, this variable was left uninitialized and caused problems when opening the stream.
2020-06-16 15:04:29 -04:00
bunnei
1fb5659dec android: BillingManager: Use real managed product for premium. 2020-06-16 15:04:29 -04:00
bunnei
e2da4ca470 android: submodules: Use github for dynarmic. 2020-06-16 15:04:29 -04:00
bunnei
66e6c9581d android: audio: Audio stretching is only useful with lower framerates, disable it when fullspeed. 2020-06-16 15:04:29 -04:00
bunnei
8928837ed0 android: video_core: Add experimental asynchronous GPU option. 2020-06-16 15:04:28 -04:00
bunnei
c129683607 Revert "android: audio: Disable audio stretching by default."
This reverts commit 9ccbba07c824e0eca168fa2563509072b6b6793d.

# Conflicts:
#	src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsFragmentPresenter.java
2020-06-16 15:04:28 -04:00
SachinVin
ae07f57a84 common/logging: Create a new backed for android's logcat 2020-06-16 15:04:28 -04:00
zhupengfei
44cbc4076b android: Microphone support
Based on Tobi's work. Created a new 'real Mic factory' which creates mic interfaces for real devices. There's a default factory set (cubeb/null, depending on whether cubeb exists) in order to avoid changing code of other frontends.

Created a factory for the Android frontend which requests mic permission and creates a CubebInput (or null). The permission requesting code is basically the same as camera's. If the user denied the permission, an alert dialog will be shown informing them of the reason.

For easier usage, by default the Audio Input Device is set to 'Real Device'.

Co-authored-by: FearlessTobi <thm.frey@gmail.com>
2020-06-16 15:04:28 -04:00
bunnei
34094a70e7 android: audio: Disable audio stretching by default. 2020-06-16 15:04:28 -04:00
bunnei
c890ad6d60 android: MainActivity: Fix crash when game directory button is not present. 2020-06-16 15:04:27 -04:00
BreadFish64
65f4c3232c android: allow navigating to external storage 2020-06-16 15:04:27 -04:00
bunnei
78f1ae8c0f android: BillingManager: Hide premium actionbar button when premium is active. 2020-06-16 15:04:27 -04:00
bunnei
5f73e23b14 android: main: res: Add premium icon and fix folder size. 2020-06-16 15:04:27 -04:00
BreadFish64
ad021f205d android: more theme changes
fix file picker dialog colors
make Citra text orange in dark mode
2020-06-16 15:04:27 -04:00
BreadFish64
b480b78588 android: inherit file-picker toolbar theme from DayNight 2020-06-16 15:04:27 -04:00
BreadFish64
e29f8a49d5 android: fix toolbar theme 2020-06-16 15:04:26 -04:00
BreadFish64
09897bfcc6 android: fix garbled names in the game list 2020-06-16 15:04:26 -04:00
SachinVin
d61b062196 android:game_info.cpp: correct grammar in comment 2020-06-16 15:04:26 -04:00
zhupengfei
481d63913d android/ndk_camera: Fix rotation
`width` and `height` are not necessarily swapped at this point
2020-06-16 15:04:26 -04:00
FearlessTobi
b8c3d24275 android: Make toolbar text black 2020-06-16 15:04:26 -04:00
SachinVin
da8db21006 android:game_info.cpp: cleanup spammy log 2020-06-16 15:04:26 -04:00
zhupengfei
3a16d5698e still_image_camera: Fix incorrect JNI usage
As `jstring`s are also object references, if we would like to use them across native methods/threads, we would have to make a global reference.

We will need to delete this global reference explicitly. Since this string is shared across multiple Interfaces and also in Factory, I used shared_ptr to manage deletion. Added a fancy SharedGlobalRef to id_cache.h.

Also removed global reference creation for java/lang/String classes. Turns out that local references are guaranteed valid for the duration of the method, and I was just being too cautious.
2020-06-16 15:04:25 -04:00
FearlessTobi
e937224646 android: Add dark theme icons 2020-06-16 15:04:25 -04:00
FearlessTobi
afcb405e5f android: Run final format 2020-06-16 15:04:25 -04:00
FearlessTobi
5d06457ad2 android: Run clang-format 2020-06-16 15:04:25 -04:00
FearlessTobi
461cfd9e1d android: Format code
Finally makes us have consistent code format in the codebase.
2020-06-16 15:04:25 -04:00
zhupengfei
85069301e5 android/ndk_camera: A few fixes
1. Remove unused code
2. Avoid crashes when camera wasn't opened
3. Avoid potential data race
2020-06-16 15:04:24 -04:00
zhupengfei
80306a8020 android: Fix camera settings
1. Fix settings crash when it gets treated as IntSetting
2. Properly report camera facing
2020-06-16 15:04:24 -04:00
bunnei
7d42c15c00 android: GameDatabase: Fix typo in rebase. 2020-06-16 15:04:24 -04:00
SachinVin
597e42d5f5 android: GameDatabase: dont add misc extensions from sub folders. 2020-06-16 15:04:24 -04:00
SachinVin
c76b7d88eb android: Recursive dir
# Conflicts:
#	src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java
#	src/android/app/src/main/jni/native.cpp

# Conflicts:
#	src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java
#	src/android/app/src/main/jni/native.cpp
2020-06-16 15:04:24 -04:00
FearlessTobi
1d1797d90b android: Add finished translations from Transifex
This adds all languages that have at least translated 50% of the Android source file.
I hope we can automate this process in the future.
2020-06-16 15:04:24 -04:00
SachinVin
84dc75806f android/CustomFilePickerFragment: fixup call super.goUp() instead 2020-06-16 15:04:24 -04:00
BreadFish64
ee3bd5e573 android/GameList: Scan for installed titles 2020-06-16 15:04:23 -04:00
SachinVin
5b70997d38 android/CustomFilePickerFragment: don't go up beyond the External Storage Directory ...
/storage/emulated/0/
2020-06-16 15:04:23 -04:00
bunnei
7e16cab310 android: overlay: Tighten portrait A/B/X/Y buttons. 2020-06-16 15:04:23 -04:00
bunnei
9a6a1045ee android: overlay: Tighten portrait input a bit, this feels more natural. 2020-06-16 15:04:23 -04:00
bunnei
a77549d168 android: InputOverlayDrawableJoystick: Fix off by 1 error with inner joystick. 2020-06-16 15:04:23 -04:00
bunnei
3a0156e8d0 android: BillingManager: Add a useful comment to onQuerySkuDetailsFinished. 2020-06-16 15:04:23 -04:00
bunnei
0209aef466 android: EmulationActivity: Fix a crash when controller is disconnected. 2020-06-16 15:04:22 -04:00
bunnei
85f3e33617 android: BillingManager: Fix issue with onQuerySkuDetailsFinished null param.
- Happens when not associated with a Google account.
2020-06-16 15:04:22 -04:00
FearlessTobi
baf6d15d98 android: Minor changes to theming 2020-06-16 15:04:22 -04:00
FearlessTobi
3d88756dde android/Settings: Set mStackCount to 0 when starting the Activity
Fixes a bug where you would have to click multiple times to get out of the settings after turning the screen off and on again.
2020-06-16 15:04:22 -04:00
SachinVin
7c82fb6382 Android: directory picker: Add archive extensions for consistency 2020-06-16 15:04:22 -04:00
FearlessTobi
6abed35dbe android: Change theme colors and modify icons 2020-06-16 15:04:22 -04:00
FearlessTobi
11682a7be9 android/MainPresenter: Add double click prevention for the buttons 2020-06-16 15:04:22 -04:00
bunnei
6f68cff90a android: settings: Fix config issue with texture_filter_name for premium. 2020-06-16 15:04:21 -04:00
bunnei
972057e615 android: native: Fix crash on multiple ZIP boots. 2020-06-16 15:04:21 -04:00
bunnei
45ee06090a android: strings: Update for asynchronous GPU. 2020-06-16 15:04:21 -04:00
bunnei
473d25b8fa android: settings: Make texture filtering a premium setting. 2020-06-16 15:04:21 -04:00
bunnei
ffd914df09 settings: PremiumSingleChoiceSetting: Fix bug in getting/setting value. 2020-06-16 15:04:21 -04:00
bunnei
5595639b08 android: EmulationActivity: Fix merge issue with onActivityResult. 2020-06-16 15:04:21 -04:00
bunnei
780a144e53 Merge branch 'mii-selector' into 'master'
android/applets: Implement Mii Selector

See merge request CitraInternal/citra-android!33
2020-06-16 15:04:21 -04:00
bunnei
f23a4f73df Merge branch 'amiibo' into 'master'
android: Add Amiibo file support

See merge request CitraInternal/citra-android!34
2020-06-16 15:04:20 -04:00
bunnei
2df0d04d2e android: native: Ensure shutdown on exit. 2020-06-16 15:04:20 -04:00
bunnei
eab2e7ec12 android: EmulationActivity: Fix gamepad triggers. 2020-06-16 15:04:20 -04:00
bunnei
5792d378b5 android: settings: Use more explicit ARG_MENU_TAG. 2020-06-16 15:04:20 -04:00
bunnei
516cb5f1c5 android: PremiumSingleChoiceSetting: Add null check to avoid a crash. 2020-06-16 15:04:20 -04:00
bunnei
ef9c40869c android: settings: Disable 'System Default' theme for pre-Android 10.
- It's not officially supported.
2020-06-16 15:04:20 -04:00
bunnei
d7d65cd8ab android: settings: Store theme setting in shared preferences.
- Fixes some jankieness.
2020-06-16 15:04:19 -04:00
bunnei
f03192a3c0 Revert "Merge branch 'rt-android' into 'master'"
This reverts commit df9f831a915524e87bf6d63ce86d76589a3fcd6c, reversing
changes made to 1e11e0aecbfdc5ddb7ad835fe673366d68788bc6.

# Conflicts:
#	src/android/app/src/main/java/org/citra/citra_emu/features/settings/ui/SettingsFragmentPresenter.java
2020-06-16 15:04:19 -04:00
SachinVin
ae4b851e6d android: create SingletonInstance for Picasso and add a place holder icon 2020-06-16 15:04:19 -04:00
FearlessTobi
27aaa54594 android: Also disable realtime audio in the settings presenter 2020-06-16 15:04:19 -04:00
SachinVin
5c385c0c9e Update dynarmic 2020-06-16 15:04:19 -04:00
zhupengfei
ec751c7c68 Address review 2020-06-16 15:04:19 -04:00
zhupengfei
f371369e85 ndk_camera: Fixes
Removed debug logs and unused code
Turned CaptureSession struct for simplicity
Added support for camera reload
Fixed ANativeWindow not released
2020-06-16 15:04:19 -04:00
zhupengfei
463449e72a android/camera: UX enhancements
1. Only request camera permissions once
2. Set the default settings to NDK camera
3. When camera device is not found, fall back to still image
4. Add 'Camera Device' configuration when one is found
5. Added a message when camera permissions are denied

For 4, I had to remove the use of the `config` field in StillImage camera.
2020-06-16 15:04:18 -04:00
zhupengfei
0d14ea8783 android: Add simple UI for camera configuration
The UI is subject to be changed. At least need to add a camera device selection. I also think we should make Device Camera the default
2020-06-16 15:04:18 -04:00
zhupengfei
469a3a4eea fixes to the NDK camera implementation 2020-06-16 15:04:18 -04:00
zhupengfei
1796965504 android/camera: Implement image flipping
We use libyuv's Mirror function to handle horizontal flip. Regarding the vertical flip, libyuv doc states that 'just set a negative height'
2020-06-16 15:04:18 -04:00
zhupengfei
9f1114aace android: Add NDK camera implementation
Not tested yet as my device doesn't support camera2...
2020-06-16 15:04:18 -04:00
zhupengfei
2ca4f58787 android: Add a still image camera
Similar to what is in the Qt frontend, this camera takes a URI to a
picture file. When the config is empty, it will open up the gallery and
ask the user to pick a picture.

The image is then read and cropped from the Java side by the Picasso library,
and sent to the native code with android NDK Bitmap API (jnigraphics).
The native code handles the format conversion with libyuv.

Image flipping is yet to be implemented.
2020-06-16 15:04:18 -04:00
zhupengfei
6412c9972f externals: Add libyuv and jnigraphics 2020-06-16 15:04:17 -04:00
bunnei
46c3b973f6 android: audio: Disable realtime audio by default. 2020-06-16 15:04:17 -04:00
bunnei
9a7b6c8a4b android: Apply correct theme at boot. 2020-06-16 15:04:17 -04:00
bunnei
404c570781 android: Implement billing for Premium. 2020-06-16 15:04:17 -04:00
zhupengfei
254fedc569 Fix a typo in swkbd
That made the application crash when an @ is typed and the game prohibited it
2020-06-16 15:04:17 -04:00
BreadFish64
5738cf946a memory: fix memory leak related to un-freed shared memory 2020-06-16 15:04:17 -04:00
BreadFish64
320cc03abb Revert "android: log: TrimSourcePath: Cannot be constexpr."
This reverts commit 21a75c52
2020-06-16 15:04:16 -04:00
FearlessTobi
69a8924344 GameDatabase: Don't rescan when upgraded
This otherwise causes a crash because the Database gets closed too early.
2020-06-16 15:04:16 -04:00
FearlessTobi
c7135ae91f GameDatabase: Increase DB_VERSION
I forgot to do this in a previous PR.
2020-06-16 15:04:16 -04:00
bunnei
30dfe6a426 android: MainActivity: Move theme setup to after settings initialization.
- Fixes a crash.
2020-06-16 15:04:16 -04:00
FearlessTobi
a395b8b9ba android: Add premium section and Dark Theme setting 2020-06-16 15:04:16 -04:00
FearlessTobi
fc0ace03d2 android/GameAdapter: Fix the getColor calls using the wrong context 2020-06-16 15:04:16 -04:00
FearlessTobi
1cfa0e97a2 android/build: Update exifinterface to version 1.2.0 2020-06-16 15:04:15 -04:00
FearlessTobi
6438c5e6c3 android: Make adjustScale reflect changes without closing the dialog 2020-06-16 15:04:15 -04:00
FearlessTobi
775a4a8fc2 android: Clarify the warning in the Debug tab 2020-06-16 15:04:15 -04:00
FearlessTobi
13705ea11e android: Enable audio stretching by default
It helps eliminate stutter and won't have a huge perf penalty, hopefully.
2020-06-16 15:04:15 -04:00
zhupengfei
42556badef gl_shader_util: Specify default precision for uimage2D
Otherwise, this causes the application to crash when compiling any shader, on both devices I tested.
2020-06-16 15:04:15 -04:00
FearlessTobi
93ddc0b5f3 android: Add game region to the GameDatabase 2020-06-16 15:04:15 -04:00
FearlessTobi
1401ab9bfc android: Remove unused JNI functions and use better names for game icon variables 2020-06-16 15:04:14 -04:00
FearlessTobi
743a0f8401 android/settings: Make background color match the rest of the app 2020-06-16 15:04:14 -04:00
FearlessTobi
b13cd2d181 styles: Use Appcompat instead of MaterialComponents in order to avoid various issues
Fixes the AppBar being black in settings and emulation when using the dark theme.
(Dolphin does the same.)

Also cleans up our styles a bit.
2020-06-16 15:04:14 -04:00
FearlessTobi
ff5b32e292 android: Fix the frame limiter
It was erroneously using the wrong config section and variable type.
2020-06-16 15:04:14 -04:00
BreadFish64
eadefb446e video_core: disable depth/stencil texture download on OpenGL ES 2020-06-16 15:04:14 -04:00
BreadFish64
7fcde40d2b android: disallow split screen 2020-06-16 15:04:14 -04:00
FearlessTobi
53f92965bd android/settings: Move VSync option to debug
Dolphin does the same and there's no real reason the users should mess with it.
2020-06-16 15:04:13 -04:00
FearlessTobi
60a6775558 android/NativeLibrary: Use Html.FROM_HTML_MODE_LEGACY
Fixes a deprecation warning.
2020-06-16 15:04:13 -04:00
FearlessTobi
82fc02aa48 android: Make more Strings translatable 2020-06-16 15:04:13 -04:00
FearlessTobi
5cb0e2809e android: Fix the menu animations
Turns out those unused methods were actually used for something.
2020-06-16 15:04:13 -04:00
FearlessTobi
4ce770d23c AndroidManifest: Workaround the crash when changing Theme while in settings
Essentially extends upon https://github.com/dolphin-emu/dolphin/pull/8288.

Original description:
"The "correct way" would be to fully save and restore data on onSaveInstanceState and restore it back on onCreate. I tried to do that first.
As there is various conflicts with doing this without some form of refactor due to how the lifecycle diverges and is baked-in to the application, ignoring Activity recreation on orientation change should work well enough and we don't draw anything different in settings on landscape mode or ui mode anyway."
2020-06-16 15:04:13 -04:00
FearlessTobi
2cf5086d36 android: Show a hint when the gamelist is empty 2020-06-16 15:04:13 -04:00
FearlessTobi
b254548b39 Make the gamelist look nicer and indicate files with a wrong extension visually 2020-06-16 15:04:12 -04:00
FearlessTobi
e66a086560 android: Change plus icon to folder icon because we don't support multiple directories 2020-06-16 15:04:12 -04:00
FearlessTobi
1874932a5e android: Add realtime audio setting 2020-06-16 15:04:12 -04:00
FearlessTobi
b51c037fa1 audio_core: Add realtime audio 2020-06-16 15:04:12 -04:00
BreadFish64
a3176778c5 video_core: bump swap chain size for GLES to reduce bottleneck 2020-06-16 15:04:12 -04:00
BreadFish64
280b819386 video_core: implement optimized D24S8->RGBA8 reinterpreters 2020-06-16 15:04:12 -04:00
James Rowe
ddf6c5aeca Use immutable storage when available 2020-06-16 15:04:11 -04:00
BreadFish64
65d774f9cd android: disable OpenGL debug message again 2020-06-16 15:04:11 -04:00
BreadFish64
fa3f1eea14 android: fix opening settings menu in-game 2020-06-16 15:04:11 -04:00
SachinVin
737fbcb490 android: SettingsFragmentPresenter.java: correct the section used in debug tab
Fixes setting always showing the default value.
2020-06-16 15:04:11 -04:00
BreadFish64
d9f33b63fc video_core: implement GLES depth/stencil downloads 2020-06-16 15:04:11 -04:00
FearlessTobi
a031198392 android: Add debug tab 2020-06-16 15:04:11 -04:00
FearlessTobi
2798d82917 Optimize imports 2020-06-16 15:04:10 -04:00
FearlessTobi
0e28702b82 android: Complete the removal of ATV and address minor Linter warnings 2020-06-16 15:04:10 -04:00
FearlessTobi
bfdb1a78b3 android: Remove obsolete AndroidTV mode and its resources 2020-06-16 15:04:10 -04:00
BreadFish64
cd6da64cf1 android: add texture filter setting 2020-06-16 15:04:10 -04:00
BreadFish64
c6b6d82e92 android: Add StringSingleChoiceSetting 2020-06-16 15:04:10 -04:00
BreadFish64
a711ee239e video_core: fix texture filters in GLES 2020-06-16 15:04:09 -04:00
zhupengfei
93765b747d android/swkbd: Properly set uncancelable
When using a DialogFragment you have to set this property on the DialogFragment itself.
2020-06-16 15:04:09 -04:00
FearlessTobi
b3a2ae2ef5 Android: Disable automatic backup
Since we don't have proper confuguration file of what to include/exclude
in the backup, this better be disabled because it will lead to unexpected
state. This will solve any issue that was keep hapenning even after fresh
install of the emulator until you manually clear the app data.

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:09 -04:00
FearlessTobi
f6044b6ba2 build: Fix abiFilter 2020-06-16 15:04:09 -04:00
FearlessTobi
7e3f314a19 jni/config: Set is_new_3ds to true by default 2020-06-16 15:04:09 -04:00
zhupengfei
19b70633ec res: Add Chinese (zh) translation 2020-06-16 15:04:09 -04:00
FearlessTobi
43bf0f89a6 android/strings: Add German translation 2020-06-16 15:04:08 -04:00
FearlessTobi
fe32c0f474 Android: Reflect the settings that is being used by the emulator on the UI
Per-Game settings now load the settings in this order
1. Emulator Settings
2. Default Settings of the Game that we ship with Dolphin
3. Custom game settings the user have

where the later always overides the former in case of collision, then
we show that on the UI to make it clear to the user which settings being
used.

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:08 -04:00
FearlessTobi
5841556fb0 strings: Add the performance warning to the translatable strings 2020-06-16 15:04:08 -04:00
FearlessTobi
842bfa2beb Android: Fix custom game settings
Apparently there was a different section names used by the custom game
settings that caused Android to have those settings broken for
some sections like the graphics one. This adds the map between the generic
settings <> custom settings.

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:08 -04:00
FearlessTobi
0b134834ec Android: Refactor the settings managemnt
1. Create Settings class the encaupslate the loading/saving of all settings
2. Decouple the logic of saving the settings into 3 different config files
from the UI code.
2020-06-16 15:04:08 -04:00
FearlessTobi
b1ee6b870b Android: Start structure the project around features instead of data types
This only moves the settings feature, the rest will be moved slowely later.

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:08 -04:00
zhupengfei
9e445a4415 android/swkbd: Fix rotation crash
Create a new DialogFragment to manage the dialog's state.
Also replaced AlertDialog with the androidx one which arguably looks better.
2020-06-16 15:04:07 -04:00
FearlessTobi
c042565065 Clean up unused resources and resolve linter warnings 2020-06-16 15:04:07 -04:00
BreadFish64
cd959ce983 android/config: initialize cpu_clock_frequency
leaving it uninitialized broke some games for obvious reasons
2020-06-16 15:04:07 -04:00
BreadFish64
68fe005d1d android: don't use ScopeAcquireContext in RunCitra
The context will be released when window is destroyed
2020-06-16 15:04:07 -04:00
zhupengfei
a62c888e15 Fix incorrect import due to library change 2020-06-16 15:04:07 -04:00
zhupengfei
6aa04a3bd3 android: SoftwareKeyboard implementation 2020-06-16 15:04:07 -04:00
BreadFish64
fd2d87f8d7 android/ndk_motion: remove ALooper_release from ndk_motion destructor
We didn't acquire the looper from another thread so this is not correct
2020-06-16 15:04:06 -04:00
BreadFish64
fdbe6cde46 android: jni cleanup 2020-06-16 15:04:06 -04:00
FearlessTobi
13d337bfff Remove unused code 2020-06-16 15:04:06 -04:00
FearlessTobi
9c1a855202 Fix a bunch of issues found by the Linter and rename Dolphin functions to Citra 2020-06-16 15:04:06 -04:00
FearlessTobi
799e2bb3c2 Android: Set up Day/Night mode for system-compatible optional dark theme
Original commit by TheRealPSV for Dolphin-emu.
2020-06-16 15:04:06 -04:00
FearlessTobi
4598e87fe0 Android: Fix displaying checkbox settings with no description
bugs.dolphin-emu.org/issues/11904.

Original commit by JosJuice for Dolphin-emu.
2020-06-16 15:04:05 -04:00
FearlessTobi
729ca846ad Moves AlertDialogs imports to AndroidX and fix tabs background color
Original commit by rafaeltoledo for Dolphin-emu.
2020-06-16 15:04:05 -04:00
FearlessTobi
1ff101c009 Bumps compile API to 29 (Q) removes unecessary casts and deprecated calls
This will help the Android client to evolve with the latest libraries (as the legacy support libs will not be shipped anymore with the com.android.support package).

This PR also makes the app compliant with the new API requirements to start later this year:
android-developers.googleblog.com/2019/02/expanding-target-api-level-requirements.html.

Original commit by rafaeltoledo for Dolphin-emu.
2020-06-16 15:04:05 -04:00
FearlessTobi
834e99c821 Migrate to AndroidX
Support Libraries are outdated and AndroidX is recommended instead. Read more here: developer.android.com/jetpack/androidx.

Original commit by Simonx22 for Dolphin-emu.
2020-06-16 15:04:05 -04:00
FearlessTobi
4ede2702c5 Android: Show files in the directory picker
People in the Google Play reviews still seem to be confused about
games not showing up in the directory picker, so let's show them
even though they can't be selected. (Either that or they haven't
realized that they need to extract their pirated games.)

Original commit by JosJuice for Dolphin-emu.
2020-06-16 15:04:05 -04:00
FearlessTobi
58fbfafd69 Android: Expand the comment for NVidiaShieldWorkaroundView
This text has been taken from the message of the commit that added
the class. (I don't have an Nvidia Shield to reproduce the bug with.)

Original commit by JosJuice for Dolphin-emu.
2020-06-16 15:04:05 -04:00
FearlessTobi
ef458ab0d9 Remove unused code
Original commit by weihuoya for Dolphin-emu.
2020-06-16 15:04:04 -04:00
FearlessTobi
675c9a6900 Fix for crash when switching to landscape mode
bugs.dolphin-emu.org/issues/10815

Original commit by allanxp4 for Dolphin-emu.
2020-06-16 15:04:04 -04:00
FearlessTobi
8c5d101588 Android: Bunch of cleanups & Updates
1. Update Picasso to latest version
2. Remove some unused code

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:04 -04:00
FearlessTobi
b31e4b7e63 Android: fix/ignore L2/R2 buttons
L2/R2 will trigger a key press and an axis event if the trigger is pressed fully down
Was incorrectly ignoring L1/R1 key presses.

Original commit by zackhow for Dolphin-emu.
2020-06-16 15:04:04 -04:00
FearlessTobi
e0780107bd Android: don't try to pause emulation when not running
Forcing landscape at emulation start revealed a bug where if the activity was
recreated before emulation started then it would get stuck in a paused state.

Original commit by zackhow for Dolphin-emu.
2020-06-16 15:04:04 -04:00
FearlessTobi
0a8fd29d02 Android: Remove the cancel button from the file browser
Fix the regresion from dolphin-emu/dolphin#7520, also it applies the change
to the directory picker only.

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:04 -04:00
FearlessTobi
0d93a232c2 Android: Change the file browser dialog ok button title
I hope this will make it more clear to users that they are suppose to
select the dircetory that has the games.

Original commit by mahdihijazi for Dolphin-emu.
2020-06-16 15:04:03 -04:00
FearlessTobi
783a5aacc0 android: remove enter and exit transition
Originally done by weihuoya for Dolphin-emu.
2020-06-16 15:04:03 -04:00
FearlessTobi
a19c808774 Android: Run Directory Initialization as a thread instead of service
Two reasons for this change. First, it appears that some android launchers do some sort of call into
the application when long pressing the app icon, which in turn calls the DirectoryInit service. This
was ok to do prior to Oreo but will cause crashes with the new restrictions on services running
in the background. Which leads to the second reason that DirectoryInit doesn't need to be a service
at all since these actions are required for dolphin to function and shouldn't be a scheduled action.
So we instead just kick this off in a new thread and send the broadcast when done.

Original commit by zackhow for Dolphin-emu
2020-06-16 15:04:03 -04:00
Marshall Mohror
81918d76bc android: implement motion controls via device sensors 2020-06-16 15:04:03 -04:00
SachinVin
5275104acb android: jni: Remove unused ndk_helper after EGL migration + cleanup jni/CMakeLists.txt 2020-06-16 15:04:03 -04:00
BreadFish64
a02a70fd69 android: allow changing settings while game is running 2020-06-16 15:04:03 -04:00
BreadFish64
02d92c4096 video_core: move buffer resize before GLES check
preventing the assert in FlushGLBuffer
2020-06-16 15:04:02 -04:00
BreadFish64
b0ae67f4b6 video_core: disable glTextureBarrier for GLES
GLES doesn't support it
2020-06-16 15:04:02 -04:00
bunnei
174f07b526 android: frontend: Limit game list to a single directory. 2020-06-16 15:04:02 -04:00
bunnei
7ed340c91e android: frontend: MainActivity: Fix issues with declining app permissions. 2020-06-16 15:04:02 -04:00
bunnei
8fac89e7c8 android: build.gradle: Bump minimum version to 26. 2020-06-16 15:04:02 -04:00
bunnei
ffc7e6acc3 android: Rename app package from citra_android to citra_emu.
- There is already a conflicting name on the Play Store.
2020-06-16 15:04:02 -04:00
bunnei
f9a737dbd6 android: emu_window: Fix surface width/height.
- Fixes a bug when resuming the app.
2020-06-16 15:04:01 -04:00
bunnei
c491655371 android: AndroidManifest: Use singleTop mode, not singleInstance.
- Fixes launching the app without restarting the emulation activity.
2020-06-16 15:04:01 -04:00
bunnei
c747e02100 android: frontend: game_list: Move add directory button to top bar. 2020-06-16 15:04:01 -04:00
bunnei
4c46697866 android: frontend: game_list: Tweak game cards. 2020-06-16 15:04:01 -04:00
bunnei
ec41880219 android: frontend: game_list: Rounded icons and other UX improvements. 2020-06-16 15:04:00 -04:00
bunnei
96c129595d android: frontend: Add vsync to the settings now that it is supported. 2020-06-16 15:04:00 -04:00
bunnei
8c911f8f59 android: emu_window: Adapt for use with split presenter thread. 2020-06-16 15:04:00 -04:00
bunnei
a7e7d98aac android: Update .gitignore for CXX compile cache. 2020-06-16 15:04:00 -04:00
bunnei
2fd197c9c8 android: renderer_opengl: Various fixes for GLES. 2020-06-16 15:04:00 -04:00
bunnei
ee6737e07b android: gradle: Update. 2020-06-16 15:04:00 -04:00
bunnei
8e8f840394 android: log: TrimSourcePath: Cannot be constexpr. 2020-06-16 15:03:59 -04:00
SachinVin
e86f623bf8 Android: frontend: use android.R.string.ok instead of literal 2020-06-16 15:03:59 -04:00
SachinVin
8f9debfd65 Android: Settings: Center the setting title when no setting description is provided. 2020-06-16 15:03:59 -04:00
bunnei
f342e3cf17 android: dsp_dsp: Move a noisy log statement to trace. 2020-06-16 15:03:59 -04:00
bunnei
c34a7e9e04 android: video_core: Enable HW shadows and texture barrier on GLES. 2020-06-16 15:03:59 -04:00
bunnei
bda8d3753d video_core: gl_shader_manager: Only set shader samplers on fragment shader.
- Avoids unnecessary uniform errors.
2020-06-16 15:03:59 -04:00
bunnei
eb8e4aa7b2 android: video_core: Require GLES 3.2 in shaders. 2020-06-16 15:03:59 -04:00
bunnei
5c62b603ec android: native: Change order of EmuWindow teardown.
- This needs to happen after system shutdown for asynchronous GPU.
2020-06-16 15:03:58 -04:00
bunnei
b3528a4c70 android: video_core: gl_rasterizer_cache: Make cache access thread safe. 2020-06-16 15:03:58 -04:00
bunnei
4b40f2a581 android: audio_core: Remove noisy log. 2020-06-16 15:03:58 -04:00
bunnei
90d30da5bb android: core: frontend: Port yuzu's code for scope acquire window context. 2020-06-16 15:03:58 -04:00
bunnei
7ca2991171 android: res: Update the launcher icon. 2020-06-16 15:03:58 -04:00
bunnei
ffbb89de98 android: frontend: FPS overlay: Add some minor margin. 2020-06-16 15:03:58 -04:00
bunnei
003e19ba7e android: jni: Migrate EmuWindow_Android class to EGL.
- This enables us to use shared contexts more easily.
2020-06-16 15:03:58 -04:00
bunnei
ac8a7a699e android: frontend: Add errors for unsupported ROM formats. 2020-06-16 15:03:57 -04:00
bunnei
263c8939d2 android: renderer_opengl: Partially implement glLogicOp on GLES. 2020-06-16 15:03:57 -04:00
SachinVin
9be1c670b2 android/GameDatabase.java: remove duplicate ".3ds" from allowedExtensions 2020-06-16 15:03:57 -04:00
bunnei
83a7ba273d android: renderer_opengl: Optimize GetTexImageOES and fix bugs. 2020-06-16 15:03:57 -04:00
bunnei
2493b8637b android: settings: Add system language setting. 2020-06-16 15:03:57 -04:00
bunnei
44ee7e545f android: settings: Fix bug where changing speed limiter will slow game down. 2020-06-16 15:03:57 -04:00
bunnei
0a85d122a1 android: frontend: Support 18.5:9 aspect ratio. 2020-06-16 15:03:57 -04:00
bunnei
a1576193b9 android: frontend: Further simplify show FPS overlay text. 2020-06-16 15:03:56 -04:00
bunnei
80105b12e9 android: frontend: Fix several issues with running notification.
- Priority should be low without sound/vibration.
- Notification should restore app.
2020-06-16 15:03:56 -04:00
bunnei
fd9038efc9 android: frontend: Use color white for FPS overlay. 2020-06-16 15:03:56 -04:00
bunnei
a5366b1e7e android: frontend: settings: Temporarily disable V-Sync. 2020-06-16 15:03:56 -04:00
bunnei
c4af6bbdaf android: frontend: Rename settings hint to "Settings". 2020-06-16 15:03:56 -04:00
bunnei
b4e72771a5 android: frontend: New and improved launcher icon. 2020-06-16 15:03:56 -04:00
bunnei
81042d8e12 android: frontend: startup: Improve startup and permissions handling.
- Fixes a first boot crash.
2020-06-16 15:03:56 -04:00
bunnei
d690e4d120 android: frontend: settings: Disable audio stretching by default. 2020-06-16 15:03:56 -04:00
bunnei
184fa8820b android: frontend: settings: Accurate shader multiplication should be disabled. 2020-06-16 15:03:55 -04:00
bunnei
1968f08c37 android: frontend: settings: Simplify sliders. 2020-06-16 15:03:55 -04:00
bunnei
7538244a03 android: frontend: menu: Improve in game options, make check boxes. 2020-06-16 15:03:55 -04:00
bunnei
d17dff9bfb android: frontend: Implement persistent notification while emulator is running. 2020-06-16 15:03:55 -04:00
bunnei
5041721219 android: Rename main entry class to CitraApplication. 2020-06-16 15:03:55 -04:00
bunnei
b317b99023 android: frontend: Implement basic software keyboard applet. 2020-06-16 15:03:55 -04:00
bunnei
67fbf8efe9 android: frontend: Use android builtin ok/yes/no/cancel strings where possible. 2020-06-16 15:03:55 -04:00
bunnei
967eb85a6a android: frontend: Add "Cancel" and "Default" buttons to reset overlay. 2020-06-16 15:03:54 -04:00
bunnei
d0d6c9c93e android: frontend: Fix bug with reset overlay scale. 2020-06-16 15:03:54 -04:00
bunnei
5029373225 android: frontend: Cleanup perf stats. 2020-06-16 15:03:54 -04:00
bunnei
1d79e59870 android: frontend: card_game: Tighten padding a little bit. 2020-06-16 15:03:54 -04:00
bunnei
6226463109 android: frontend: gamelist: Save PlatformGamesFragment state.
- Fixes weird duplication of game list on rotation.
2020-06-16 15:03:54 -04:00
bunnei
9e4e54cbd7 android: frontend: gamelist: Fix weird scroll behavior with action bar. 2020-06-16 15:03:54 -04:00
bunnei
0b88b02b47 android: jni: Improve management of core emulation state.
- Furthermore fixes bug where audio crackling could bleed out of the app.
2020-06-16 15:03:54 -04:00
bunnei
0231fbed80 android: frontend: settings: Add a back button to the navigation bar. 2020-06-16 15:03:54 -04:00
bunnei
853839e0b2 android: frontend: gamelist: Add swipe to refresh gesture. 2020-06-16 15:03:53 -04:00
bunnei
1ba645266d android: frontend: settings: Disable configuring D-pad as buttons. 2020-06-16 15:03:53 -04:00
bunnei
2079ca13fe android: frontend: settings: Rename "controller" section to "gamepad". 2020-06-16 15:03:53 -04:00
bunnei
d453ae7e1e android: frontend: menu_settings: Remove save button. 2020-06-16 15:03:53 -04:00
bunnei
162534ab56 android: frontend: fragment_settings: Remove margins. 2020-06-16 15:03:53 -04:00
bunnei
1c5e081dfe android: frontend: settings: Simply save toast. 2020-06-16 15:03:53 -04:00
bunnei
902fee74f9 android: frontend: EmulationActivity: Remove citra icon from game prompt. 2020-06-16 15:03:53 -04:00
bunnei
862d090b09 gl_rasterizer_cache: Remove redundant GLES check. 2020-06-16 15:03:53 -04:00
bunnei
cfbd193ff3 android: gl_rasterizer_cache: Skip costly shutdown procedure. 2020-06-16 15:03:52 -04:00
bunnei
f43141260c android: jni: Fix how we handle orientation changes.
- This previously broke Jave to C++ bindings.
2020-06-16 15:03:52 -04:00
bunnei
16cd2b79c0 core: Reset cpu_core after kernel.
- Fixes a crash on Android.
2020-06-16 15:03:52 -04:00
bunnei
0bb0bcc2c7 android: jni: config: Disable shaders_accurate_mul by default (it's too slow). 2020-06-16 15:03:52 -04:00
bunnei
ebe77c59f2 android: jni: Add IDCache to cache Java methods. 2020-06-16 15:03:52 -04:00
bunnei
991ec9f2b0 android: Picasso: Use newer version and some minor cleanup. 2020-06-16 15:03:52 -04:00
bunnei
ba9a467f2b android: AndroidManifest.xml: Require GLES 3.1 and AEP. 2020-06-16 15:03:52 -04:00
bunnei
281ec2da7b android: native: Reset old EmuWindow before constructing a new one.
- Enforces that touch is unregistered at the right time, ensuring it works for subsequent runs.
2020-06-16 15:03:51 -04:00
bunnei
77cd5ea046 android: native: Use actual array length for banner copy. 2020-06-16 15:03:51 -04:00
bunnei
d2a23098f2 android: frontend: Add config option for linear filtering. 2020-06-16 15:03:51 -04:00
bunnei
f90853e30d android: settings: Add/update missing config options from latest master. 2020-06-16 15:03:51 -04:00
bunnei
2472e954f1 android: settings: Remove shaders_accurate_gs and toggle_3d.
- shaders_accurate_gs no longer exists.
- toggle_3d was renamed, but is not used on Android.
2020-06-16 15:03:51 -04:00
bunnei
c8f37a97fd android: input: Add support for gamepads. 2020-06-16 15:03:51 -04:00
bunnei
a1f58cb5eb android: frontend: SettingsFragmentPresenter: Add config options for joypad controls. 2020-06-16 15:03:51 -04:00
bunnei
a64559a4c0 android: frontend: MotionAlertDialog: Merge latest Dolphin code. 2020-06-16 15:03:51 -04:00
Weiyi Wang
628675deb6 Add reset button to slider setting 2020-06-16 15:03:50 -04:00
Weiyi Wang
43ed38242b move speed limiter to general 2020-06-16 15:03:50 -04:00
bunnei
8825af368a android: frontend: SettingsFile: Add button strings. 2020-06-16 15:03:50 -04:00
bunnei
b719615714 android: frontend: strings: Cleanup for controller input. 2020-06-16 15:03:50 -04:00
bunnei
a0755458c3 android: app: Add method to get global context. 2020-06-16 15:03:50 -04:00
bunnei
39926ce7a0 android: jni: Remove unnecessary code. 2020-06-16 15:03:50 -04:00
Weiyi Wang
58b55c5cd6 remove redundant code 2020-06-16 15:03:50 -04:00
Weiyi Wang
4f544aa98c Also fix default value for speed limiter & audio stretcher 2020-06-16 15:03:50 -04:00
Weiyi Wang
aa064f9f6b Accurate GS is default to true in config 2020-06-16 15:03:49 -04:00
Weiyi Wang
d8784c6acf fix system clock default value 2020-06-16 15:03:49 -04:00
Weiyi Wang
930d93b86c fix time picker not saving/loading time 2020-06-16 15:03:49 -04:00
Weiyi Wang
b8b48bce4e Fix TimePicker style 2020-06-16 15:03:49 -04:00
Weiyi Wang
ddafab17a9 move "select game folder" string to resource 2020-06-16 15:03:49 -04:00
Weiyi Wang
c699fd7a48 Add title to file picker 2020-06-16 15:03:49 -04:00
bunnei
27b1f62ecd android: config: Enable accurate multiplication by default. 2020-06-16 15:03:49 -04:00
bunnei
48d9d05988 android: frontend: Update circle pad icon resources. 2020-06-16 15:03:48 -04:00
bunnei
91ce94fd93 android: frontend: Swap select and start buttons to match 3DS. 2020-06-16 15:03:48 -04:00
bunnei
9160085b7a android: frontend: settings: String cleanup & minor improvements. 2020-06-16 15:03:48 -04:00
bunnei
c623504308 android: native: Ensure game config is re-loaded before starting. 2020-06-16 15:03:48 -04:00
bunnei
324cf9b019 android: frontend: Remove Home button for now, as it does not do anything. 2020-06-16 15:03:48 -04:00
bunnei
a9362d60c9 android: frontend: Add a confirmation dialog on game exit. 2020-06-16 15:03:48 -04:00
bunnei
0f2e28ef5c android: frontend: Update controls overlay placement for new icon resources. 2020-06-16 15:03:48 -04:00
bunnei
4c4da0510e android: frontend: Update to new icon resources. 2020-06-16 15:03:47 -04:00
bunnei
a60c447d31 android: frontend: settings: Add performance warnings for relevant settings. 2020-06-16 15:03:47 -04:00
bunnei
56fb1e0549 android: frontend: Remove "Toggle All" option from toggle controls.
- This was broken, and is not terribly useful as-is.
2020-06-16 15:03:47 -04:00
bunnei
43bb93795a android: frontend: Decrease spacing between game cards. 2020-06-16 15:03:47 -04:00
bunnei
37cecc53a2 android: jni: Fix management of core emulation state and various cleanups.
- Fixes a shutdown crash.
2020-06-16 15:03:47 -04:00
bunnei
0fb74ba437 android: frontend: Fix bug where games could be double-clicked. 2020-06-16 15:03:46 -04:00
bunnei
0451a70b6e android: jni: Sanitize analog stick inputs.
- Fixes bug where joystick sometimes is unresponsive.
2020-06-16 15:03:46 -04:00
bunnei
9656dedb95 android: frontend: Fix default state for toggle controls, enable D-pad by default. 2020-06-16 15:03:46 -04:00
bunnei
c093b85654 android: frontend: Add persistent changeable layout option for landscape mode. 2020-06-16 15:03:46 -04:00
bunnei
4f1218c90d android: frontend: Track screen layout separately for orientation. 2020-06-16 15:03:46 -04:00
bunnei
09e15e750d android: frontend: Add MobileLandscape layout profile for mobile devices. 2020-06-16 15:03:46 -04:00
James Rowe
f5a9d9276c Adds in missing changes to gradle file and updates dynarmic 2020-06-16 15:03:46 -04:00
bunnei
2a47fb0768 android: jni: button_manager: Fix circle pad on subsequent game launch.
- We were missing an UnregisterFactory call for AnalogDevice.
2020-06-16 15:03:46 -04:00
bunnei
a64a3b9a0e android: frontend: MainPresenter: Refresh game directory on app boot. 2020-06-16 15:03:45 -04:00
bunnei
d9c9103927 android: jni: game_info: Fix crash on banner load for missing title. 2020-06-16 15:03:45 -04:00
bunnei
bc06218da3 android: jni: config: Fix bug preventing creation of config.ini. 2020-06-16 15:03:45 -04:00
bunnei
832314a813 android: frontend: StartupHandler: Add an intro sequence to pick game dir. 2020-06-16 15:03:45 -04:00
bunnei
62cf3140dc android: frontend: SettingsFragmentPresenter: Default resolution scale to 1X.
- Because android phones aren't very fast.
2020-06-16 15:03:45 -04:00
bunnei
035bb32281 android: core: Prepare for ARM64 dynarmic support. 2020-06-16 15:03:45 -04:00
bunnei
2353fbe146 android: frontend: Settings: Section categories must match INI settings. 2020-06-16 15:03:45 -04:00
bunnei
e110b458a3 android: frontend: Settings: Various updates and preserve single choice text in UI. 2020-06-16 15:03:45 -04:00
bunnei
27e84f9cfc android: frontend: SettingsFragmentPresenter: Move speed limit to Graphics, give proper strings. 2020-06-16 15:03:44 -04:00
bunnei
f37bdd0121 android: frontend: Enlarge icon for launcher. 2020-06-16 15:03:44 -04:00
bunnei
b9cd650a24 android: frontend: SettingsFragmentPresenter: Organize settings into logical categories. 2020-06-16 15:03:44 -04:00
bunnei
88cdfb093a android: frontend: SettingsFragmentPresenter: Remove unnecessary settings, add JIT setting. 2020-06-16 15:03:44 -04:00
bunnei
8ce38efd13 android: frontend: InputOverlay: Fix setting save for portrait mode. 2020-06-16 15:03:44 -04:00
bunnei
2acca2b6ca android: frontend: Fix settings slider cancel button. 2020-06-16 15:03:44 -04:00
bunnei
2064653bcd android: frontend: auto-reformat all code for consistent style. 2020-06-16 15:03:44 -04:00
bunnei
c48e96dc1f android: dynarmic: Use internal dynarmic submodule. 2020-06-16 15:03:43 -04:00
James Rowe
9c4524281b Perf: Remove more breakpoint checking in the interpreter. Move filtering earlier in the logging chain 2020-06-16 15:03:43 -04:00
bunnei
99a2391d05 (jroweboy) Remove existing code in src/android
Move src/citra_android to src/android/app/src/main/jni
Disable gdbstub breakpoints on android (could be done better)
Disable LOD_BIAS for GLES (not support on gles)
2020-06-16 15:03:43 -04:00
bunnei
7b54e7dfc7 android: frontend: Implement MobilePortrait layout, which makes more sense for mobile. 2020-06-16 15:03:42 -04:00
bunnei
3eac04285c android: native: Remove several unused hooks. 2020-06-16 15:03:42 -04:00
bunnei
3a4b387908 android: native: Add hooks for SwitchScreenLayout and SwapScreens. 2020-06-16 15:03:42 -04:00
bunnei
5b38151729 android: config: Update to reflect latest settings. 2020-06-16 15:03:42 -04:00
bunnei
248a406e99 android: frontend: Add base project. 2020-06-16 15:03:42 -04:00
346 changed files with 22150 additions and 30969 deletions

View File

@ -0,0 +1,39 @@
# Set-up Visual Studio Command Prompt environment for PowerShell
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\"
cmd /c "VsDevCmd.bat -arch=x64 & set" | foreach {
if ($_ -match "=") {
$v = $_.split("="); Set-Item -Force -Path "ENV:\$($v[0])" -Value "$($v[1])"
}
}
popd
function Which ($search_path, $name) {
($search_path).Split(";") | Get-ChildItem -Filter $name | Select -First 1 -Exp FullName
}
function GetDeps ($search_path, $binary) {
((dumpbin /dependents $binary).Where({ $_ -match "dependencies:"}, "SkipUntil") | Select-String "[^ ]*\.dll").Matches | foreach {
Which $search_path $_.Value
}
}
function RecursivelyGetDeps ($search_path, $binary) {
$final_deps = @()
$deps_to_process = GetDeps $search_path $binary
while ($deps_to_process.Count -gt 0) {
$current, $deps_to_process = $deps_to_process
if ($final_deps -contains $current) { continue }
# Is this a system dll file?
# We use the same algorithm that cmake uses to determine this.
if ($current -match "$([regex]::Escape($env:SystemRoot))\\sys") { continue }
if ($current -match "$([regex]::Escape($env:WinDir))\\sys") { continue }
if ($current -match "\\msvc[^\\]+dll") { continue }
if ($current -match "\\api-ms-win-[^\\]+dll") { continue }
$final_deps += $current
$new_deps = GetDeps $search_path $current
$deps_to_process += ($new_deps | ?{-not ($final_deps -contains $_)})
}
return $final_deps
}

39
.appveyor/ProcessPdb.ps1 Normal file
View File

@ -0,0 +1,39 @@
# Generate pdb files for mingw
if ($env:BUILD_TYPE -eq 'mingw') {
Invoke-WebRequest -Uri https://raw.githubusercontent.com/citra-emu/ext-windows-bin/master/cv2pdb/cv2pdb.exe -OutFile cv2pdb.exe
foreach ($exe in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "citra*.exe") {
.\cv2pdb $exe.FullName
}
}
# Specify source locations in pdb via srcsrv.ini
$srcsrv = "SRCSRV: ini ------------------------------------------------`r`n"
$srcsrv += "VERSION=2`r`n"
$srcsrv += "VERCTRL=http`r`n"
$srcsrv += "SRCSRV: variables ------------------------------------------`r`n"
$srcsrv += "SRCSRVTRG=https://raw.githubusercontent.com/%var2%/%var3%/%var4%`r`n"
$srcsrv += "SRCSRV: source files ---------------------------------------`r`n"
foreach ($repo in @{
"citra-emu/citra" = ""
"citra-emu/ext-boost" = "externals/boost"
"citra-emu/ext-soundtouch" = "externals/soundtouch"
"fmtlib/fmt" = "externals/fmt"
"herumi/xbyak" = "externals/xbyak"
"lsalzman/enet" = "externals/enet"
"MerryMage/dynarmic" = "externals/dynarmic"
"neobrain/nihstro" = "externals/nihstro"
}.GetEnumerator()) {
pushd
cd $repo.Value
$rev = git rev-parse HEAD
$files = git ls-tree --name-only --full-tree -r HEAD
foreach ($file in $files) {
$srcsrv += "$(pwd)\$($file -replace '/','\')*$($repo.Name)*$rev*$file`r`n"
}
popd
}
$srcsrv += "SRCSRV: end ------------------------------------------------`r`n"
Set-Content -Path srcsrv.ini -Value $srcsrv
foreach ($pdb in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "*.pdb") {
& "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:srcsrv.ini -p:$pdb.FullName -s:srcsrv
}

View File

@ -1,4 +0,0 @@
#!/bin/bash -ex
# Run clang-format
./.ci/linux-clang-format/script.sh

View File

@ -1,7 +0,0 @@
#!/bin/sh -ex
brew update
brew unlink python@2 || true
rm '/usr/local/bin/2to3' || true
brew install qt5 sdl2 p7zip ccache ffmpeg llvm ninja || true
pip3 install macpack

View File

@ -1,10 +0,0 @@
#!/bin/sh -ex
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
ninja
# show the caching efficiency
buildcache -s
ctest -VV -C Release || echo "::error ::Test error occurred on Windows MSVC build"

View File

@ -1,10 +0,0 @@
#!/bin/sh -ex
BUILDCACHE_VERSION="0.22.3"
choco install wget ninja
# Install buildcache
wget "https://github.com/mbitsnbites/buildcache/releases/download/v${BUILDCACHE_VERSION}/buildcache-win-mingw.zip"
7z x 'buildcache-win-mingw.zip'
mv ./buildcache/bin/buildcache.exe "/c/ProgramData/chocolatey/bin"
rm -rf ./buildcache/

View File

@ -1,12 +1,3 @@
---
name: Bug Report / Feature Request
about: Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with Citra or you are requesting a feature you believe would make Citra better.
title: ''
labels: ''
assignees: ''
---
<!--- <!---
Please read the FAQ: Please read the FAQ:

View File

@ -1,11 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: Citra Discord
url: https://citra-emu.org/discord/
about: If you are experiencing an issue with Citra, and you need tech support, or if you have a general question, try asking in the official Citra Discord linked here. Piracy is not allowed.
- name: Community forums
url: https://community.citra-emu.org
about: This is an alternative place for tech support, however helpers there are not as active.
- name: Citra Android
url: https://github.com/citra-emu/citra-android
about: If you need tech support on Citra Android, you should use either of the above two options. If you want to file an issue, you should go to the Android repo linked here.

View File

@ -1,134 +0,0 @@
name: citra-ci
on:
push:
branches: [ "*" ]
tags: [ "*" ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image: ["linux-clang-format", "linux-fresh", "linux-frozen", "linux-mingw"]
container: citraemu/build-environments:${{ matrix.image }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.image }}-
- name: Query tag name
uses: little-core-labs/get-git-tag@v3.0.2
id: tagName
- name: Build
run: ./.ci/${{ matrix.image }}/docker.sh
env:
ENABLE_COMPATIBILITY_REPORTING: "ON"
- name: Pack
run: ./.ci/${{ matrix.image }}/upload.sh
if: ${{ matrix.image != 'linux-frozen' && matrix.image != 'linux-clang-format' }}
env:
NAME: ${{ matrix.image }}
- name: Upload
uses: actions/upload-artifact@v2
if: ${{ matrix.image != 'linux-frozen' && matrix.image != 'linux-clang-format' }}
with:
name: ${{ matrix.image }}
path: artifacts/
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: ~/Library/Caches/ccache
key: ${{ runner.os }}-macos-${{ github.sha }}
restore-keys: |
${{ runner.os }}-macos-
- name: Query tag name
uses: little-core-labs/get-git-tag@v3.0.2
id: tagName
- name: Install dependencies
run: ./.ci/macos/deps.sh
- name: Build
run: ./.ci/macos/build.sh
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
ENABLE_COMPATIBILITY_REPORTING: "ON"
- name: Pack
run: ./.ci/macos/upload.sh
- name: Upload
uses: actions/upload-artifact@v2
with:
name: macos
path: artifacts/
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up cache
uses: actions/cache@v2
with:
path: ~/.buildcache
key: ${{ runner.os }}-win-${{ github.sha }}
restore-keys: |
${{ runner.os }}-win-
- name: Install dependencies
run: ./.ci/windows-msvc/deps.sh
shell: bash
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build
run: ./.ci/windows-msvc/build.sh
shell: bash
env:
ENABLE_COMPATIBILITY_REPORTING: "ON"
transifex:
runs-on: ubuntu-latest
container: citraemu/build-environments:linux-transifex
if: ${{ github.repository == 'citra-emu/citra' && !github.head_ref }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Update Translation
run: ./.ci/transifex/docker.sh
env:
TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [build, macos]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/download-artifact@v2
- name: Query tag name
uses: little-core-labs/get-git-tag@v3.0.2
id: tagName
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tagName.outputs.tag }}
release_name: ${{ steps.tagName.outputs.tag }}
draft: false
prerelease: false
- name: Upload artifacts
uses: alexellis/upload-assets@0.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./**/*.tar.*","./**/*.7z","./**/*.zip"]'

2
.gitmodules vendored
View File

@ -12,7 +12,7 @@
url = https://github.com/philsquared/Catch.git url = https://github.com/philsquared/Catch.git
[submodule "dynarmic"] [submodule "dynarmic"]
path = externals/dynarmic path = externals/dynarmic
url = https://github.com/citra-emu/dynarmic.git url = https://github.com/citra-emu/dynarmic-android
[submodule "xbyak"] [submodule "xbyak"]
path = externals/xbyak path = externals/xbyak
url = https://github.com/herumi/xbyak.git url = https://github.com/herumi/xbyak.git

View File

@ -1,13 +0,0 @@
path_classifiers:
library: "externals"
extraction:
cpp:
prepare:
packages:
- "libsdl2-dev"
- "qtmultimedia5-dev"
- "clang-format-6.0"
- "libtbb-dev"
- "libjack-jackd2-dev"
- "doxygen"
- "graphviz"

87
.travis.yml Normal file
View File

@ -0,0 +1,87 @@
language: cpp
matrix:
include:
- os: linux
env: NAME="clang-format"
sudo: required
dist: trusty
services: docker
install: "./.travis/clang-format/deps.sh"
script: "./.travis/clang-format/build.sh"
- os: linux
env: NAME="linux build"
sudo: required
dist: trusty
services: docker
addons:
apt:
packages:
- p7zip-full
install: "./.travis/linux/deps.sh"
script: "./.travis/linux/build.sh"
after_success: "./.travis/linux/upload.sh"
cache: ccache
- if: repo = citra-emu/citra AND branch = master AND type = push
os: linux
env: NAME="transifex push"
sudo: required
dist: trusty
services: docker
install: "./.travis/transifex/deps.sh"
script: "./.travis/transifex/build.sh"
- os: osx
env: NAME="macos build"
sudo: false
osx_image: xcode10.2
install: "./.travis/macos/deps.sh"
script: "./.travis/macos/build.sh"
after_success: "./.travis/macos/upload.sh"
cache: ccache
- os: linux
env: NAME="linux build (debug, frozen versions of dependencies, no additional CMake flags)"
sudo: required
dist: trusty
services: docker
cache: ccache
install: "./.travis/linux-frozen/deps.sh"
script: "./.travis/linux-frozen/build.sh"
- os: linux
env: NAME="MinGW build"
sudo: required
dist: trusty
services: docker
addons:
apt:
packages:
- p7zip-full
install: "./.travis/linux-mingw/deps.sh"
script: "./.travis/linux-mingw/build.sh"
after_success: "./.travis/linux-mingw/upload.sh"
cache: ccache
- if: repo =~ ^.*\/(citra-canary|citra-nightly)$ AND tag IS present
git:
depth: false
os: linux
env: NAME="flatpak build"
sudo: required
dist: trusty
services: docker
cache: ccache
install: "./.travis/linux-flatpak/deps.sh"
script: "./.travis/linux-flatpak/build.sh"
after_script: "./.travis/linux-flatpak/finish.sh"
deploy:
provider: releases
api_key:
secure: Mck15DIWaJdxDiS3aYVlM9N3G6y8VKUI1rnwII7/iolfm1s94U+tgvbheZDmT7SSbFyaGaYO/E8HrV/uZR9Vvs7ev20sHsTN1u60OTWfDIIyHs9SqjhcGbtq95m9/dMFschOYqTOR+gAs5BsxjuoeAotHdhpQEwvkO2oo5oR0zhGy45gjFnVvtcxT/IfpZBIpVgcK3aLb9zT6ekcJbSiPmEB15iLq3xXd0nFUNtEZdX3D6Veye4n5jB6n72qN8JVoKvPZAwaC2K0pZxpcGJaXDchLsw1q+4eCvdz6UJfUemeQ/uMAmjfeQ3wrzYGXe3nCM3WmX5wosCsB0mw4zYatzl3si6CZ1W+0GkV4Rwlx03dfp7v3EeFhTsXYCaXqhwuLZnWOLUik8t9vaSoFUx4nUIRwfO9kAMUJQSpLuHNO2nT01s3GxvqxzczuLQ9he5nGSi0RRodUzDwek1qUp6I4uV3gRHKz4B07YIc1i2fK88NLXjyQ0uLVZ+7Oq1+kgDp6+N7vvXXZ5qZ17tdaysSbKEE0Y8zsoXw7Rk1tPN19vrCS+TSpomNMyQyne1k+I5iZ/qkxPTLAS5qI6Utc2dL3GJdxWRAEfGNO9AIX3GV/jmmKfdcvwGsCYP8hxqs5vLYfgacw3D8NLf1941lQUwavC17jm9EV9g5G3Pn1Cp516E=
file_glob: true
file: "artifacts/*"
skip_cleanup: true
on:
tags: true
notifications:
webhooks:
urls:
- https://api.citra-emu.org/code/travis/notify

3
.travis/clang-format/deps.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -ex
docker pull citraemu/build-environments:linux-clang-format

5
.travis/clang-format/docker.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash -ex
# Run clang-format
cd /citra
./.travis/clang-format/script.sh

View File

@ -1,13 +1,13 @@
#!/bin/bash -ex #!/bin/bash -ex
if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop \ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .travis* dist/*.desktop \
dist/*.svg dist/*.xml; then dist/*.svg dist/*.xml; then
echo Trailing whitespace found, aborting echo Trailing whitespace found, aborting
exit 1 exit 1
fi fi
# Default clang-format points to default 3.5 version one # Default clang-format points to default 3.5 version one
CLANG_FORMAT=clang-format-10 CLANG_FORMAT=clang-format-6.0
$CLANG_FORMAT --version $CLANG_FORMAT --version
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then

View File

@ -10,11 +10,11 @@ cp -r dist/scripting "$REV_NAME"
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME" tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
# Find out what release we are building # Find out what release we are building
if [ -z $GIT_TAG_NAME ]; then if [ -z $TRAVIS_TAG ]; then
RELEASE_NAME=head RELEASE_NAME=head
else else
RELEASE_NAME=$(echo $GIT_TAG_NAME | cut -d- -f1) RELEASE_NAME=$(echo $TRAVIS_TAG | cut -d- -f1)
if [ "$NAME" = "linux-mingw" ]; then if [ "$NAME" = "MinGW build" ]; then
RELEASE_NAME="${RELEASE_NAME}-mingw" RELEASE_NAME="${RELEASE_NAME}-mingw"
fi fi
fi fi

4
.travis/linux-flatpak/deps.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh -ex
# Download the docker image that contains flatpak build dependencies
docker pull citraemu/build-environments:linux-flatpak

View File

@ -87,8 +87,7 @@ cat > /tmp/org.citra.$REPO_NAME.json <<EOF
"-DENABLE_QT_TRANSLATION=ON", "-DENABLE_QT_TRANSLATION=ON",
"-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON", "-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON",
"-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON", "-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON",
"-DENABLE_FFMPEG_VIDEO_DUMPER=ON", "-DENABLE_FFMPEG_VIDEO_DUMPER=ON"
"-DENABLE_FDK=ON"
], ],
"cleanup": [ "cleanup": [
"/bin/citra", "/bin/citra",

5
.travis/linux-frozen/deps.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh -ex
sudo apt-get -y install binutils-gold
docker pull citraemu/build-environments:linux-frozen

View File

@ -7,6 +7,7 @@ chmod a+x ~/bin/gold/ld
export CFLAGS="-B$HOME/bin/gold $CFLAGS" export CFLAGS="-B$HOME/bin/gold $CFLAGS"
export CXXFLAGS="-B$HOME/bin/gold $CXXFLAGS" export CXXFLAGS="-B$HOME/bin/gold $CXXFLAGS"
cd /citra
mkdir build && cd build mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++

3
.travis/linux-mingw/deps.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -ex
docker pull citraemu/build-environments:linux-mingw

View File

@ -1,7 +1,7 @@
#!/bin/bash -ex #!/bin/bash -ex
# override CI ccache size cd /citra
mkdir -p "$HOME/.ccache/" # override Travis CI unreasonable ccache size
echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf" echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf"
mkdir build && cd build mkdir build && cd build
@ -27,4 +27,4 @@ cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/ cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
rm -f package/mediaservice/*d.dll rm -f package/mediaservice/*d.dll
python3 .ci/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/" python3 .travis/linux-mingw/scan_dll.py package/*.exe package/imageformats/*.dll "package/"

View File

@ -1,7 +1,4 @@
try: import pefile
import lief
except ImportError:
import pefile
import sys import sys
import re import re
import os import os
@ -16,26 +13,13 @@ KNOWN_SYS_DLLS = ['WINMM.DLL', 'MSVCRT.DLL', 'VERSION.DLL', 'MPR.DLL',
DLL_PATH = [ DLL_PATH = [
'/usr/x86_64-w64-mingw32/bin/', '/usr/x86_64-w64-mingw32/bin/',
'/usr/x86_64-w64-mingw32/lib/', '/usr/x86_64-w64-mingw32/lib/',
'/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix/' '/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/'
] ]
missing = [] missing = []
def parse_imports_lief(filename):
results = []
pe = lief.parse(filename)
for entry in pe.imports:
name = entry.name
if name.upper() not in KNOWN_SYS_DLLS and not re.match(string=name, pattern=r'.*32\.DLL'):
results.append(name)
return results
def parse_imports(file_name): def parse_imports(file_name):
if globals().get('lief'):
return parse_imports_lief(file_name)
results = [] results = []
pe = pefile.PE(file_name, fast_load=True) pe = pefile.PE(file_name, fast_load=True)
pe.parse_data_directories() pe.parse_data_directories()

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex #!/bin/bash -ex
. .ci/common/pre-upload.sh . .travis/common/pre-upload.sh
REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}" REV_NAME="citra-windows-mingw-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.gz" ARCHIVE_NAME="${REV_NAME}.tar.gz"
@ -10,4 +10,4 @@ mkdir "$REV_NAME"
# get around the permission issues # get around the permission issues
cp -r package/* "$REV_NAME" cp -r package/* "$REV_NAME"
. .ci/common/post-upload.sh . .travis/common/post-upload.sh

3
.travis/linux/deps.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -ex
docker pull citraemu/build-environments:linux-fresh

View File

@ -1,5 +1,7 @@
#!/bin/bash -ex #!/bin/bash -ex
cd /citra
mkdir build && cd build mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
ninja ninja

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex #!/bin/bash -ex
. .ci/common/pre-upload.sh . .travis/common/pre-upload.sh
REV_NAME="citra-linux-${GITDATE}-${GITREV}" REV_NAME="citra-linux-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.xz" ARCHIVE_NAME="${REV_NAME}.tar.xz"
@ -8,12 +8,12 @@ COMPRESSION_FLAGS="-cJvf"
mkdir "$REV_NAME" mkdir "$REV_NAME"
cp build/bin/Release/citra "$REV_NAME" cp build/bin/citra "$REV_NAME"
cp build/bin/Release/citra-room "$REV_NAME" cp build/bin/citra-room "$REV_NAME"
cp build/bin/Release/citra-qt "$REV_NAME" cp build/bin/citra-qt "$REV_NAME"
# We need icons on Linux for .desktop entries # We need icons on Linux for .desktop entries
mkdir "$REV_NAME/dist" mkdir "$REV_NAME/dist"
cp dist/icon.png "$REV_NAME/dist/citra.png" cp dist/icon.png "$REV_NAME/dist/citra.png"
. .ci/common/post-upload.sh . .travis/common/post-upload.sh

View File

@ -2,23 +2,12 @@
set -o pipefail set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.13
export Qt5_DIR=$(brew --prefix)/opt/qt5 export Qt5_DIR=$(brew --prefix)/opt/qt5
export PATH="/usr/local/opt/ccache/libexec:/usr/local/opt/llvm/bin:$PATH" export PATH="/usr/local/opt/ccache/libexec:$PATH"
# ccache configurations
export CCACHE_CPP2=yes
export CCACHE_SLOPPINESS=time_macros
export CC="ccache clang"
export CXX="ccache clang++"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
ccache -s
mkdir build && cd build mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_AUDIO_DECODER=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON -GNinja cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_AUDIO_DECODER=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON
ninja make -j4
ccache -s
ctest -VV -C Release ctest -VV -C Release

6
.travis/macos/deps.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh -ex
brew update
brew unlink python@2
brew install qt5 sdl2 p7zip ccache ffmpeg
pip3 install macpack

View File

@ -1,6 +1,6 @@
#!/bin/bash -ex #!/bin/bash -ex
. .ci/common/pre-upload.sh . .travis/common/pre-upload.sh
REV_NAME="citra-osx-${GITDATE}-${GITREV}" REV_NAME="citra-osx-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.gz" ARCHIVE_NAME="${REV_NAME}.tar.gz"
@ -8,9 +8,9 @@ COMPRESSION_FLAGS="-czvf"
mkdir "$REV_NAME" mkdir "$REV_NAME"
cp build/bin/Release/citra "$REV_NAME" cp build/bin/citra "$REV_NAME"
cp -r build/bin/Release/citra-qt.app "$REV_NAME" cp -r build/bin/citra-qt.app "$REV_NAME"
cp build/bin/Release/citra-room "$REV_NAME" cp build/bin/citra-room "$REV_NAME"
# move libs into folder for deployment # move libs into folder for deployment
macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks" macpack "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt" -d "../Frameworks"
@ -20,14 +20,10 @@ $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" -executable=
# move libs into folder for deployment # move libs into folder for deployment
macpack "${REV_NAME}/citra" -d "libs" macpack "${REV_NAME}/citra" -d "libs"
# workaround for libc++
install_name_tool -change @loader_path/../Frameworks/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt"
install_name_tool -change @loader_path/libs/libc++.1.0.dylib /usr/lib/libc++.1.dylib "${REV_NAME}/citra"
# Make the launching script executable # Make the launching script executable
chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt chmod +x ${REV_NAME}/citra-qt.app/Contents/MacOS/citra-qt
# Verify loader instructions # Verify loader instructions
find "$REV_NAME" -type f -exec otool -L {} \; find "$REV_NAME" -exec otool -L {} \;
. .ci/common/post-upload.sh . .travis/common/post-upload.sh

3
.travis/transifex/deps.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -ex
docker pull citraemu/build-environments:linux-transifex

View File

@ -30,6 +30,7 @@ cmake --version
gcc -v gcc -v
tx --version tx --version
cd /citra
mkdir build && cd build mkdir build && cd build
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF
make translation make translation

View File

@ -126,7 +126,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set up output paths for executable binaries # set up output paths for executable binaries
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/$<CONFIG>) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# System imported libraries # System imported libraries
@ -186,7 +186,7 @@ if (ENABLE_QT)
set(QT_PREFIX_HINT) set(QT_PREFIX_HINT)
endif() endif()
find_package(Qt5 REQUIRED COMPONENTS Widgets Multimedia ${QT_PREFIX_HINT}) find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL Multimedia ${QT_PREFIX_HINT})
if (ENABLE_QT_TRANSLATION) if (ENABLE_QT_TRANSLATION)
find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT}) find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT})
@ -250,7 +250,7 @@ endif()
# against all the src files. This should be used before making a pull request. # against all the src files. This should be used before making a pull request.
# ======================================================================= # =======================================================================
set(CLANG_FORMAT_POSTFIX "-10") set(CLANG_FORMAT_POSTFIX "-6.0")
find_program(CLANG_FORMAT find_program(CLANG_FORMAT
NAMES clang-format${CLANG_FORMAT_POSTFIX} NAMES clang-format${CLANG_FORMAT_POSTFIX}
clang-format clang-format
@ -261,7 +261,7 @@ if (NOT CLANG_FORMAT)
message(STATUS "Clang format not found! Downloading...") message(STATUS "Clang format not found! Downloading...")
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe") set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
file(DOWNLOAD file(DOWNLOAD
https://github.com/citra-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
"${CLANG_FORMAT}" SHOW_PROGRESS "${CLANG_FORMAT}" SHOW_PROGRESS
STATUS DOWNLOAD_SUCCESS) STATUS DOWNLOAD_SUCCESS)
if (NOT DOWNLOAD_SUCCESS EQUAL 0) if (NOT DOWNLOAD_SUCCESS EQUAL 0)
@ -344,7 +344,7 @@ add_subdirectory(externals)
# Boost # Boost
if (USE_SYSTEM_BOOST) if (USE_SYSTEM_BOOST)
find_package(Boost 1.70.0 COMPONENTS serialization REQUIRED) find_package(Boost 1.70.0 QUIET REQUIRED)
else() else()
add_library(Boost::boost ALIAS boost) add_library(Boost::boost ALIAS boost)
add_library(Boost::serialization ALIAS boost_serialization) add_library(Boost::serialization ALIAS boost_serialization)

View File

@ -16,6 +16,7 @@ function(copy_citra_Qt5_deps target_dir)
icuuc*.dll icuuc*.dll
Qt5Core$<$<CONFIG:Debug>:d>.* Qt5Core$<$<CONFIG:Debug>:d>.*
Qt5Gui$<$<CONFIG:Debug>:d>.* Qt5Gui$<$<CONFIG:Debug>:d>.*
Qt5OpenGL$<$<CONFIG:Debug>:d>.*
Qt5Widgets$<$<CONFIG:Debug>:d>.* Qt5Widgets$<$<CONFIG:Debug>:d>.*
Qt5Multimedia$<$<CONFIG:Debug>:d>.* Qt5Multimedia$<$<CONFIG:Debug>:d>.*
Qt5Network$<$<CONFIG:Debug>:d>.* Qt5Network$<$<CONFIG:Debug>:d>.*

View File

@ -21,9 +21,9 @@ get_timestamp(BUILD_DATE)
set(REPO_NAME "") set(REPO_NAME "")
set(BUILD_VERSION "0") set(BUILD_VERSION "0")
if (DEFINED ENV{CI}) if (DEFINED ENV{CI})
if (DEFINED ENV{GITHUB_ACTIONS}) if (DEFINED ENV{TRAVIS})
set(BUILD_REPOSITORY $ENV{GITHUB_REPOSITORY}) set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
set(BUILD_TAG $ENV{GIT_TAG_NAME}) set(BUILD_TAG $ENV{TRAVIS_TAG})
elseif(DEFINED ENV{APPVEYOR}) elseif(DEFINED ENV{APPVEYOR})
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME}) set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME}) set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})

View File

@ -1,12 +0,0 @@
# buildcache wrapper
OPTION(USE_CCACHE "Use buildcache for compilation" OFF)
IF(USE_CCACHE)
FIND_PROGRAM(CCACHE buildcache)
IF (CCACHE)
MESSAGE(STATUS "Using buildcache found in PATH")
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
ELSE(CCACHE)
MESSAGE(WARNING "USE_CCACHE enabled, but no buildcache executable found")
ENDIF(CCACHE)
ENDIF(USE_CCACHE)

View File

@ -47,7 +47,7 @@ IF(NOT DEFINED ENV{MINGW_DEBUG_INFO})
MESSAGE("* WINDRES : ${WINDRES}") MESSAGE("* WINDRES : ${WINDRES}")
MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}") MESSAGE("* ENV{PKG_CONFIG} : $ENV{PKG_CONFIG}")
MESSAGE("* STRIP : ${STRIP}") MESSAGE("* STRIP : ${STRIP}")
MESSAGE("* USE_CCACHE : ${USE_CCACHE}") MESSAGE("* USE_CCACHE : ${USE_CCACHE}")
MESSAGE("") MESSAGE("")
# So that the debug info only appears once # So that the debug info only appears once
SET(ENV{MINGW_DEBUG_INFO} SHOWN) SET(ENV{MINGW_DEBUG_INFO} SHOWN)

View File

@ -2,7 +2,8 @@
Citra Citra
============== ==============
[![GitHub Actions Build Status](https://github.com/citra-emu/citra/workflows/citra-ci/badge.svg)](https://github.com/citra-emu/citra/actions) [![Travis CI Build Status](https://travis-ci.com/citra-emu/citra.svg?branch=master)](https://travis-ci.com/citra-emu/citra)
[![AppVeyor CI Build Status](https://ci.appveyor.com/api/projects/status/sdf1o4kh3g1e68m9?svg=true)](https://ci.appveyor.com/project/bunnei/citra)
[![Bitrise CI Build Status](https://app.bitrise.io/app/4ccd8e5720f0d13b/status.svg?token=H32TmbCwxb3OQ-M66KbAyw&branch=master)](https://app.bitrise.io/app/4ccd8e5720f0d13b) [![Bitrise CI Build Status](https://app.bitrise.io/app/4ccd8e5720f0d13b/status.svg?token=H32TmbCwxb3OQ-M66KbAyw&branch=master)](https://app.bitrise.io/app/4ccd8e5720f0d13b)
[![Discord](https://img.shields.io/discord/220740965957107713?color=%237289DA&label=Citra&logo=discord&logoColor=white)](https://discord.gg/FAXfZV9) [![Discord](https://img.shields.io/discord/220740965957107713?color=%237289DA&label=Citra&logo=discord&logoColor=white)](https://discord.gg/FAXfZV9)
@ -24,7 +25,7 @@ Most of the development happens on GitHub. It's also where [our central reposito
If you want to contribute please take a look at the [Contributor's Guide](https://github.com/citra-emu/citra/wiki/Contributing) and [Developer Information](https://github.com/citra-emu/citra/wiki/Developer-Information). You should also contact any of the developers in the forum in order to know about the current state of the emulator because the [TODO list](https://docs.google.com/document/d/1SWIop0uBI9IW8VGg97TAtoT_CHNoP42FzYmvG1F4QDA) isn't maintained anymore. If you want to contribute please take a look at the [Contributor's Guide](https://github.com/citra-emu/citra/wiki/Contributing) and [Developer Information](https://github.com/citra-emu/citra/wiki/Developer-Information). You should also contact any of the developers in the forum in order to know about the current state of the emulator because the [TODO list](https://docs.google.com/document/d/1SWIop0uBI9IW8VGg97TAtoT_CHNoP42FzYmvG1F4QDA) isn't maintained anymore.
If you want to contribute to the user interface translation, please check out the [citra project on transifex](https://www.transifex.com/citra/citra). We centralize the translation work there, and periodically upstream translations. If you want to contribute to the user interface translation, please checkout [citra project on transifex](https://www.transifex.com/citra/citra). We centralize the translation work there, and periodically upstream translation.
### Building ### Building

173
appveyor.yml Normal file
View File

@ -0,0 +1,173 @@
# shallow clone
clone_depth: 10
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
os: Visual Studio 2017
environment:
# Tell msys2 to add mingw64 to the path
MSYSTEM: MINGW64
# Tell msys2 to inherit the current directory when starting the shell
CHERE_INVOKING: 1
matrix:
- BUILD_TYPE: mingw
- BUILD_TYPE: msvc
platform:
- x64
configuration:
- Release
install:
- git submodule update --init --recursive
- ps: |
if ($env:BUILD_TYPE -eq 'mingw') {
$dependencies = "mingw64/mingw-w64-x86_64-cmake mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-ffmpeg"
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-SDL2-2.0.12-1-any.pkg.tar.xz"
C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S $dependencies"
# (HACK) ignore errors
0
}
before_build:
- mkdir %BUILD_TYPE%_build
- cd %BUILD_TYPE%_build
- ps: |
$COMPAT = if ($env:ENABLE_COMPATIBILITY_REPORTING -eq $null) {0} else {$env:ENABLE_COMPATIBILITY_REPORTING}
if ($env:BUILD_TYPE -eq 'msvc') {
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON .. 2>&1 && exit 0'
} else {
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_MF=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON .. 2>&1"
}
- cd ..
build_script:
- ps: |
if ($env:BUILD_TYPE -eq 'msvc') {
# https://www.appveyor.com/docs/build-phase
msbuild msvc_build/citra.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
} else {
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -j4 -C mingw_build/ 2>&1'
}
after_build:
- ps: |
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-",""
$GITREV = $(git show -s --format='%h')
# Find out which kind of release we are producing by tag name
if ($env:APPVEYOR_REPO_TAG_NAME) {
$RELEASE_DIST, $RELEASE_VERSION = $env:APPVEYOR_REPO_TAG_NAME.split('-')
} else {
# There is no repo tag - make assumptions
$RELEASE_DIST = "head"
}
if ($env:BUILD_TYPE -eq 'msvc') {
# Where are these spaces coming from? Regardless, let's remove them
$MSVC_BUILD_ZIP = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
$MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
$MSVC_SEVENZIP = "citra-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
# set the build names as env vars so the artifacts can upload them
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
$env:BUILD_UPDATE = $MSVC_SEVENZIP
mkdir $RELEASE_DIST
Copy-Item .\msvc_build\bin\release\* -Destination $RELEASE_DIST -Recurse
Copy-Item .\license.txt -Destination $RELEASE_DIST
Copy-Item .\README.md -Destination $RELEASE_DIST
# process PDBs
. "./.appveyor/ProcessPdb.ps1"
7z a -tzip $MSVC_BUILD_PDB $RELEASE_DIST\*.pdb
rm $RELEASE_DIST\*.pdb
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
7z a $MSVC_SEVENZIP $RELEASE_DIST
} else {
$MINGW_BUILD_ZIP = "citra-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
$MINGW_BUILD_PDB = "citra-windows-mingw-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
$MINGW_SEVENZIP = "citra-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
# store the build information in env vars so we can use them as artifacts
$env:BUILD_ZIP = $MINGW_BUILD_ZIP
$env:BUILD_SYMBOLS = $MINGW_BUILD_PDB
$env:BUILD_UPDATE = $MINGW_SEVENZIP
$CMAKE_SOURCE_DIR = "$env:APPVEYOR_BUILD_FOLDER"
$CMAKE_BINARY_DIR = "$CMAKE_SOURCE_DIR/mingw_build"
$RELEASE_DIST = $RELEASE_DIST + "-mingw"
mkdir $RELEASE_DIST
mkdir $RELEASE_DIST/platforms
mkdir $RELEASE_DIST/mediaservice
mkdir $RELEASE_DIST/styles
mkdir $RELEASE_DIST/imageformats
# copy the compiled binaries and other release files to the release folder
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "citra*.exe" | Copy-Item -destination $RELEASE_DIST
Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
Copy-Item -path "$CMAKE_SOURCE_DIR/README.md" -destination $RELEASE_DIST
# copy the qt windows plugin dll to platforms
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/platforms/qwindows.dll" -force -destination "$RELEASE_DIST/platforms"
# copy the qt mediaservice plugin dll
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/mediaservice/dsengine.dll" -force -destination "$RELEASE_DIST/mediaservice"
# copy the qt windows vista style dll to platforms
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/styles/qwindowsvistastyle.dll" -force -destination "$RELEASE_DIST/styles"
# copy the qt imageformats plugin dlls to imageformats
Get-ChildItem "C:/msys64/mingw64/share/qt5/plugins/imageformats" -Exclude "*d.dll" | Copy-Item -force -destination "$RELEASE_DIST/imageformats"
# copy all the dll dependencies to the release folder
. "./.appveyor/FindDependencies.ps1"
$DLLSearchPath = "C:\msys64\mingw64\bin;$env:PATH"
$MingwDLLs = RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra.exe"
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra-qt.exe"
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\imageformats\qjpeg.dll"
Write-Host "Detected the following dependencies:"
Write-Host $MingwDLLs
foreach ($file in $MingwDLLs) {
Copy-Item -path "$file" -force -destination "$RELEASE_DIST"
}
# process PDBs
. "./.appveyor/ProcessPdb.ps1"
7z a -tzip $MINGW_BUILD_PDB $RELEASE_DIST\*.pdb
rm $RELEASE_DIST\*.pdb
7z a -tzip $MINGW_BUILD_ZIP $RELEASE_DIST\*
7z a $MINGW_SEVENZIP $RELEASE_DIST
}
test_script:
- cd %BUILD_TYPE%_build
- ps: |
if ($env:BUILD_TYPE -eq 'msvc') {
ctest -VV -C Release
} else {
C:\msys64\usr\bin\bash.exe -lc "ctest -VV -C Release"
}
- cd ..
artifacts:
- path: $(BUILD_ZIP)
name: build
type: zip
- path: $(BUILD_SYMBOLS)
name: debugsymbols
- path: $(BUILD_UPDATE)
name: update
notifications:
- provider: Webhook
url: https://api.citra-emu.org/code/appveyor/notify

View File

@ -42,8 +42,8 @@ workflows:
The next change in your repository that matches any of your trigger map event will start **deploy** workflow. The next change in your repository that matches any of your trigger map event will start **deploy** workflow.
steps: steps:
- cache-pull@2.4.0: {} - cache-pull@2.0.1: {}
- script@1.1.6: - script@1.1.5:
title: Install newer cmake title: Install newer cmake
inputs: inputs:
- content: |- - content: |-
@ -52,7 +52,7 @@ workflows:
sudo apt remove cmake -y sudo apt remove cmake -y
sudo apt purge --auto-remove cmake -y sudo apt purge --auto-remove cmake -y
sudo apt install ninja-build -y sudo apt install ninja-build -y
version=3.19 version=3.10
build=2 build=2
mkdir ~/temp mkdir ~/temp
cd ~/temp cd ~/temp
@ -60,13 +60,13 @@ workflows:
sudo mkdir /opt/cmake sudo mkdir /opt/cmake
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
envman add --key PATH --value "/opt/cmake/bin:$PATH" envman add --key PATH --value "/opt/cmake/bin:$PATH"
- install-missing-android-tools@2.3.8: - install-missing-android-tools@2.3.3:
inputs: inputs:
- gradlew_path: "$PROJECT_LOCATION/gradlew" - gradlew_path: "$PROJECT_LOCATION/gradlew"
- change-android-versioncode-and-versionname@1.1.1: - change-android-versioncode-and-versionname@1.1.1:
inputs: inputs:
- build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle" - build_gradle_path: "$PROJECT_LOCATION/$MODULE/build.gradle"
- android-lint@0.9.8: - android-lint@0.9.5:
inputs: inputs:
- project_location: "$PROJECT_LOCATION" - project_location: "$PROJECT_LOCATION"
- module: "$MODULE" - module: "$MODULE"
@ -76,19 +76,19 @@ workflows:
- project_location: "$PROJECT_LOCATION" - project_location: "$PROJECT_LOCATION"
- module: "$MODULE" - module: "$MODULE"
- variant: "$TEST_VARIANT" - variant: "$TEST_VARIANT"
- android-build@0.10.3: - android-build@0.9.5:
inputs: inputs:
- project_location: "$PROJECT_LOCATION" - project_location: "$PROJECT_LOCATION"
- module: "$MODULE" - module: "$MODULE"
- variant: "$BUILD_VARIANT" - variant: "$BUILD_VARIANT"
- sign-apk@1.2.3: - sign-apk@1.2.3:
run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}' run_if: '{{getenv "BITRISEIO_ANDROID_KEYSTORE_URL" | ne ""}}'
- deploy-to-bitrise-io@1.11.1: {} - deploy-to-bitrise-io@1.3.18: {}
- cache-push@2.4.1: {} - cache-push@2.0.5: {}
primary: primary:
steps: steps:
- cache-pull@2.4.0: {} - cache-pull@2.0.1: {}
- script@1.1.6: - script@1.1.5:
title: Install newer cmake title: Install newer cmake
inputs: inputs:
- content: |- - content: |-
@ -97,7 +97,7 @@ workflows:
sudo apt remove cmake -y sudo apt remove cmake -y
sudo apt purge --auto-remove cmake -y sudo apt purge --auto-remove cmake -y
sudo apt install ninja-build -y sudo apt install ninja-build -y
version=3.19 version=3.10
build=2 build=2
mkdir ~/temp mkdir ~/temp
cd ~/temp cd ~/temp
@ -105,20 +105,20 @@ workflows:
sudo mkdir /opt/cmake sudo mkdir /opt/cmake
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license --exclude-subdir
envman add --key PATH --value "/opt/cmake/bin:$PATH" envman add --key PATH --value "/opt/cmake/bin:$PATH"
- install-missing-android-tools@2.3.8: - install-missing-android-tools@2.3.3:
inputs: inputs:
- gradlew_path: "$PROJECT_LOCATION/gradlew" - gradlew_path: "$PROJECT_LOCATION/gradlew"
- android-lint@0.9.8: - android-lint@0.9.5:
inputs: inputs:
- project_location: "$PROJECT_LOCATION" - project_location: "$PROJECT_LOCATION"
- module: "$MODULE" - module: "$MODULE"
- variant: "$TEST_VARIANT" - variant: "$TEST_VARIANT"
- android-build@0.10.3: - android-build@0.9.5:
inputs: inputs:
- variant: Debug - variant: Debug
- project_location: "$PROJECT_LOCATION" - project_location: "$PROJECT_LOCATION"
- deploy-to-bitrise-io@1.11.1: {} - deploy-to-bitrise-io@1.3.18: {}
- cache-push@2.4.1: {} - cache-push@2.0.5: {}
app: app:
envs: envs:
- opts: - opts:

80
dist/citra.manifest vendored
View File

@ -1,58 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
xmlns="urn:schemas-microsoft-com:asm.v1" <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <security>
<asmv3:application> <requestedPrivileges>
<asmv3:windowsSettings> <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
<!-- Windows 7/8/8.1/10 --> </requestedPrivileges>
<dpiAware </security>
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> </trustInfo>
true/pm <application xmlns="urn:schemas-microsoft-com:asm.v3">
</dpiAware> <windowsSettings>
<!-- Windows 10, version 1607 or later --> <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
<dpiAwareness <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> </windowsSettings>
PerMonitorV2 </application>
</dpiAwareness> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<!-- Windows 10, version 1703 or later --> <application>
<gdiScaling <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings"> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
true <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</gdiScaling> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<ws2:longPathAware </application>
xmlns:ws3="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> </compatibility>
true </assembly>
</ws2:longPathAware>
</asmv3:windowsSettings>
</asmv3:application>
<compatibility
xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
<trustInfo
xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<!--
UAC settings:
- app should run at same integrity level as calling process
- app does not need to manipulate windows belonging to
higher-integrity-level processes
-->
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

File diff suppressed because it is too large Load Diff

1209
dist/languages/de.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1035
dist/languages/fi.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1168
dist/languages/fr.ts vendored

File diff suppressed because it is too large Load Diff

5400
dist/languages/hu_HU.ts vendored Normal file

File diff suppressed because it is too large Load Diff

971
dist/languages/id.ts vendored

File diff suppressed because it is too large Load Diff

974
dist/languages/it.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1008
dist/languages/nb.ts vendored

File diff suppressed because it is too large Load Diff

967
dist/languages/nl.ts vendored

File diff suppressed because it is too large Load Diff

1205
dist/languages/pl_PL.ts vendored

File diff suppressed because it is too large Load Diff

1044
dist/languages/pt_BR.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -30,20 +30,13 @@ target_include_directories(catch-single-include INTERFACE catch/single_include)
# Crypto++ # Crypto++
add_subdirectory(cryptopp) add_subdirectory(cryptopp)
# Xbyak
if (ARCHITECTURE_x86_64)
add_library(xbyak INTERFACE)
target_include_directories(xbyak SYSTEM INTERFACE ./xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
endif()
# Dynarmic # Dynarmic
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_ARM64) # Dynarmic will skip defining xbyak if it's already defined, we then define it below
set(DYNARMIC_TESTS OFF) add_library(xbyak INTERFACE)
set(DYNARMIC_NO_BUNDLED_FMT ON) option(DYNARMIC_TESTS OFF)
set(DYNARMIC_FRONTENDS "A32") set(DYNARMIC_NO_BUNDLED_FMT ON)
add_subdirectory(dynarmic) set(DYNARMIC_FRONTENDS "A32")
endif() add_subdirectory(dynarmic)
# libfmt # libfmt
add_subdirectory(fmt) add_subdirectory(fmt)
@ -79,9 +72,17 @@ target_include_directories(SoundTouch INTERFACE ./soundtouch/include)
# Teakra # Teakra
add_subdirectory(teakra EXCLUDE_FROM_ALL) add_subdirectory(teakra EXCLUDE_FROM_ALL)
# Xbyak
if (ARCHITECTURE_x86_64)
# Defined before "dynarmic" above
# add_library(xbyak INTERFACE)
target_include_directories(xbyak INTERFACE ./xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)
endif()
# Zstandard # Zstandard
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL) add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
target_include_directories(libzstd_static INTERFACE $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/externals/zstd/lib>) target_include_directories(libzstd_static INTERFACE ./zstd/lib)
# ENet # ENet
add_subdirectory(enet) add_subdirectory(enet)

2
externals/catch vendored

@ -1 +1 @@
Subproject commit de6fe184a9ac1a06895cdd1c9b437f0a0bdf14ad Subproject commit 15cf3caaceb21172ea42a24e595a2eb58c3ec960

2
externals/cubeb vendored

@ -1 +1 @@
Subproject commit 1d66483ad2b93f0e00e175f9480c771af90003a7 Subproject commit 616d773441b5355800ce64197a699e6cd6b36172

2
externals/dynarmic vendored

@ -1 +1 @@
Subproject commit 358cf6f0357baae3e3bb5788431acf1068f897b5 Subproject commit adeb4940dd3ca92677bd3c3b0ce1ec6174493b00

2
externals/fmt vendored

@ -1 +1 @@
Subproject commit cc09f1a6798c085c325569ef466bcdcffdc266d4 Subproject commit 4b8f8fac96a7819f28f4be523ca10a2d5d8aaaf2

2
externals/inih/inih vendored

@ -1 +1 @@
Subproject commit 1e80a47dffbda813604f0913e2ad68c7054c14e4 Subproject commit 2023872dfffb38b6a98f2c45a0eb25652aaea91f

View File

@ -1,9 +1,9 @@
JSON for Modern C++ JSON for Modern C++
=================== ===================
v3.9.0 v3.1.2
This is a mirror providing the single required header file. This is a mirror providing the single required header file.
The original repository can be found at: The original repository can be found at:
https://github.com/nlohmann/json/commit/d34771cafc87b358ba421faca28facc7f8080174 https://github.com/nlohmann/json/commit/d2dd27dc3b8472dbaa7d66f83619b3ebcd9185fe

18467
externals/json/json.hpp vendored

File diff suppressed because it is too large Load Diff

View File

@ -152,11 +152,9 @@ typedef uint16_t MicroProfileGroupId;
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <algorithm>
#include <array>
#include <atomic>
#include <mutex>
#include <thread> #include <thread>
#include <mutex>
#include <atomic>
#ifndef MICROPROFILE_API #ifndef MICROPROFILE_API
#define MICROPROFILE_API #define MICROPROFILE_API
@ -607,45 +605,28 @@ struct MicroProfileFrameState
struct MicroProfileThreadLog struct MicroProfileThreadLog
{ {
std::array<MicroProfileLogEntry, MICROPROFILE_BUFFER_SIZE> Log{}; MicroProfileLogEntry Log[MICROPROFILE_BUFFER_SIZE];
std::atomic<uint32_t> nPut{0}; std::atomic<uint32_t> nPut;
std::atomic<uint32_t> nGet{0}; std::atomic<uint32_t> nGet;
uint32_t nActive = 0; uint32_t nActive;
uint32_t nGpu = 0; uint32_t nGpu;
ThreadIdType nThreadId{}; ThreadIdType nThreadId;
std::array<uint32_t, MICROPROFILE_STACK_MAX> nStack{}; uint32_t nStack[MICROPROFILE_STACK_MAX];
std::array<int64_t, MICROPROFILE_STACK_MAX> nChildTickStack{}; int64_t nChildTickStack[MICROPROFILE_STACK_MAX];
uint32_t nStackPos = 0; uint32_t nStackPos;
std::array<uint8_t, MICROPROFILE_MAX_GROUPS> nGroupStackPos{}; uint8_t nGroupStackPos[MICROPROFILE_MAX_GROUPS];
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nGroupTicks{}; int64_t nGroupTicks[MICROPROFILE_MAX_GROUPS];
std::array<int64_t, MICROPROFILE_MAX_GROUPS> nAggregateGroupTicks{}; int64_t nAggregateGroupTicks[MICROPROFILE_MAX_GROUPS];
enum enum
{ {
THREAD_MAX_LEN = 64, THREAD_MAX_LEN = 64,
}; };
char ThreadName[64]{}; char ThreadName[64];
int nFreeListNext = 0; int nFreeListNext;
void Reset() {
Log.fill({});
nPut = 0;
nGet = 0;
nActive = 0;
nGpu = 0;
nThreadId = {};
nStack.fill(0);
nChildTickStack.fill(0);
nStackPos = 0;
nGroupStackPos.fill(0);
nGroupTicks.fill(0);
nAggregateGroupTicks.fill(0);
std::fill(std::begin(ThreadName), std::end(ThreadName), '\0');
nFreeListNext = 0;
}
}; };
#if MICROPROFILE_GPU_TIMERS_D3D11 #if MICROPROFILE_GPU_TIMERS_D3D11
@ -946,11 +927,7 @@ typedef HANDLE MicroProfileThread;
DWORD _stdcall ThreadTrampoline(void* pFunc) DWORD _stdcall ThreadTrampoline(void* pFunc)
{ {
MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc; MicroProfileThreadFunc F = (MicroProfileThreadFunc)pFunc;
return (uint32_t)F(0);
// The return value of F will always return a void*, however, this is for
// compatibility with pthreads. The underlying "address" of the pointer
// is always a 32-bit value, so this cast is safe to perform.
return static_cast<DWORD>(reinterpret_cast<uint64_t>(F(0)));
} }
void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func) void MicroProfileThreadStart(MicroProfileThread* pThread, MicroProfileThreadFunc Func)
@ -1041,7 +1018,7 @@ static void MicroProfileCreateThreadLogKey()
#else #else
MP_THREAD_LOCAL MicroProfileThreadLog* g_MicroProfileThreadLog = 0; MP_THREAD_LOCAL MicroProfileThreadLog* g_MicroProfileThreadLog = 0;
#endif #endif
static std::atomic<bool> g_bUseLock{false}; /// This is used because windows does not support using mutexes under dll init(which is where global initialization is handled) static bool g_bUseLock = false; /// This is used because windows does not support using mutexes under dll init(which is where global initialization is handled)
MICROPROFILE_DEFINE(g_MicroProfileFlip, "MicroProfile", "MicroProfileFlip", 0x3355ee); MICROPROFILE_DEFINE(g_MicroProfileFlip, "MicroProfile", "MicroProfileFlip", 0x3355ee);
@ -1174,7 +1151,6 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
MP_ASSERT(pLog->nPut.load() == 0); MP_ASSERT(pLog->nPut.load() == 0);
MP_ASSERT(pLog->nGet.load() == 0); MP_ASSERT(pLog->nGet.load() == 0);
S.nFreeListHead = S.Pool[S.nFreeListHead]->nFreeListNext; S.nFreeListHead = S.Pool[S.nFreeListHead]->nFreeListNext;
pLog->Reset();
} }
else else
{ {
@ -1182,6 +1158,7 @@ MicroProfileThreadLog* MicroProfileCreateThreadLog(const char* pName)
S.nMemUsage += sizeof(MicroProfileThreadLog); S.nMemUsage += sizeof(MicroProfileThreadLog);
S.Pool[S.nNumLogs++] = pLog; S.Pool[S.nNumLogs++] = pLog;
} }
memset(pLog, 0, sizeof(*pLog));
int len = (int)strlen(pName); int len = (int)strlen(pName);
int maxlen = sizeof(pLog->ThreadName)-1; int maxlen = sizeof(pLog->ThreadName)-1;
len = len < maxlen ? len : maxlen; len = len < maxlen ? len : maxlen;
@ -1229,8 +1206,8 @@ void MicroProfileOnThreadExit()
{ {
S.Frames[i].nLogStart[nLogIndex] = 0; S.Frames[i].nLogStart[nLogIndex] = 0;
} }
pLog->nGroupStackPos.fill(0); memset(pLog->nGroupStackPos, 0, sizeof(pLog->nGroupStackPos));
pLog->nGroupTicks.fill(0); memset(pLog->nGroupTicks, 0, sizeof(pLog->nGroupTicks));
} }
} }

View File

@ -169,13 +169,14 @@ MICROPROFILEUI_API void MicroProfileCustomGroup(const char* pCustomName, uint32_
MICROPROFILEUI_API void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer); MICROPROFILEUI_API void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer);
#ifdef MICROPROFILEUI_IMPL #ifdef MICROPROFILEUI_IMPL
#include <inttypes.h> #ifdef _WIN32
#define snprintf _snprintf
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <math.h> #include <math.h>
#include <algorithm> #include <algorithm>
#include <array>
MICROPROFILE_DEFINE(g_MicroProfileDetailed, "MicroProfile", "Detailed View", 0x8888000); MICROPROFILE_DEFINE(g_MicroProfileDetailed, "MicroProfile", "Detailed View", 0x8888000);
MICROPROFILE_DEFINE(g_MicroProfileDrawGraph, "MicroProfile", "Draw Graph", 0xff44ee00); MICROPROFILE_DEFINE(g_MicroProfileDrawGraph, "MicroProfile", "Draw Graph", 0xff44ee00);
@ -226,10 +227,10 @@ struct SOptionDesc
uint8_t nIndex; uint8_t nIndex;
bool bSelected; bool bSelected;
}; };
static const std::array<uint32_t, 6> g_MicroProfileAggregatePresets{0, 10, 20, 30, 60, 120}; static uint32_t g_MicroProfileAggregatePresets[] = {0, 10, 20, 30, 60, 120};
static const std::array<float, 10> g_MicroProfileReferenceTimePresets{5.f, 10.f, 15.f,20.f, 33.33f, 66.66f, 100.f, 250.f, 500.f, 1000.f}; static float g_MicroProfileReferenceTimePresets[] = {5.f, 10.f, 15.f,20.f, 33.33f, 66.66f, 100.f, 250.f, 500.f, 1000.f};
static const std::array<uint32_t, 4> g_MicroProfileOpacityPresets{0x40, 0x80, 0xc0, 0xff}; static uint32_t g_MicroProfileOpacityPresets[] = {0x40, 0x80, 0xc0, 0xff};
static const std::array<const char*, 7> g_MicroProfilePresetNames static const char* g_MicroProfilePresetNames[] =
{ {
MICROPROFILE_DEFAULT_PRESET, MICROPROFILE_DEFAULT_PRESET,
"Render", "Render",
@ -242,8 +243,8 @@ static const std::array<const char*, 7> g_MicroProfilePresetNames
enum enum
{ {
MICROPROFILE_NUM_REFERENCE_PRESETS = g_MicroProfileReferenceTimePresets.size(), MICROPROFILE_NUM_REFERENCE_PRESETS = sizeof(g_MicroProfileReferenceTimePresets)/sizeof(g_MicroProfileReferenceTimePresets[0]),
MICROPROFILE_NUM_OPACITY_PRESETS = g_MicroProfileOpacityPresets.size(), MICROPROFILE_NUM_OPACITY_PRESETS = sizeof(g_MicroProfileOpacityPresets)/sizeof(g_MicroProfileOpacityPresets[0]),
#if MICROPROFILE_CONTEXT_SWITCH_TRACE #if MICROPROFILE_CONTEXT_SWITCH_TRACE
MICROPROFILE_OPTION_SIZE = MICROPROFILE_NUM_REFERENCE_PRESETS + MICROPROFILE_NUM_OPACITY_PRESETS * 2 + 2 + 7, MICROPROFILE_OPTION_SIZE = MICROPROFILE_NUM_REFERENCE_PRESETS + MICROPROFILE_NUM_OPACITY_PRESETS * 2 + 2 + 7,
#else #else
@ -325,9 +326,9 @@ struct MicroProfileUI
MicroProfileUI g_MicroProfileUI; MicroProfileUI g_MicroProfileUI;
#define UI g_MicroProfileUI #define UI g_MicroProfileUI
static const std::array<uint32_t, 2> g_nMicroProfileBackColors{ 0x474747, 0x313131 }; static uint32_t g_nMicroProfileBackColors[2] = { 0x474747, 0x313131 };
#define MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS 16 #define MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS 16
static const std::array<uint32_t, MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS> g_nMicroProfileContextSwitchThreadColors //palette generated by http://tools.medialab.sciences-po.fr/iwanthue/index.php static uint32_t g_nMicroProfileContextSwitchThreadColors[MICROPROFILE_NUM_CONTEXT_SWITCH_COLORS] = //palette generated by http://tools.medialab.sciences-po.fr/iwanthue/index.php
{ {
0x63607B, 0x63607B,
0x755E2B, 0x755E2B,
@ -355,7 +356,7 @@ void MicroProfileInitUI()
{ {
bInitialized = true; bInitialized = true;
memset(&g_MicroProfileUI, 0, sizeof(g_MicroProfileUI)); memset(&g_MicroProfileUI, 0, sizeof(g_MicroProfileUI));
UI.nActiveMenu = UINT32_MAX; UI.nActiveMenu = (uint32_t)-1;
UI.fDetailedOffsetTarget = UI.fDetailedOffset = 0.f; UI.fDetailedOffsetTarget = UI.fDetailedOffset = 0.f;
UI.fDetailedRangeTarget = UI.fDetailedRange = 50.f; UI.fDetailedRangeTarget = UI.fDetailedRange = 50.f;
@ -367,7 +368,7 @@ void MicroProfileInitUI()
UI.nWidth = 100; UI.nWidth = 100;
UI.nHeight = 100; UI.nHeight = 100;
UI.nCustomActive = UINT32_MAX; UI.nCustomActive = (uint32_t)-1;
UI.nCustomTimerCount = 0; UI.nCustomTimerCount = 0;
UI.nCustomCount = 0; UI.nCustomCount = 0;
@ -497,8 +498,8 @@ void MicroProfileDrawFloatWindow(uint32_t nX, uint32_t nY, const char** ppString
{ {
MicroProfileDrawBox(nX-MICROPROFILE_TEXT_WIDTH, nY, nX, nY + MICROPROFILE_TEXT_WIDTH, pColors[i]|0xff000000); MicroProfileDrawBox(nX-MICROPROFILE_TEXT_WIDTH, nY, nX, nY + MICROPROFILE_TEXT_WIDTH, pColors[i]|0xff000000);
} }
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i0], (uint32_t)strlen(ppStrings[i0])); MicroProfileDrawText(nX + 1, nY + 1, (uint32_t)-1, ppStrings[i0], (uint32_t)strlen(ppStrings[i0]));
MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, UINT32_MAX, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1])); MicroProfileDrawText(nX + nWidth - nStringLengths[i0+1] * (MICROPROFILE_TEXT_WIDTH+1), nY + 1, (uint32_t)-1, ppStrings[i0+1], (uint32_t)strlen(ppStrings[i0+1]));
nY += (MICROPROFILE_TEXT_HEIGHT+1); nY += (MICROPROFILE_TEXT_HEIGHT+1);
} }
} }
@ -521,7 +522,7 @@ void MicroProfileDrawTextBox(uint32_t nX, uint32_t nY, const char** ppStrings, u
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000); MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000);
for(uint32_t i = 0; i < nNumStrings; ++i) for(uint32_t i = 0; i < nNumStrings; ++i)
{ {
MicroProfileDrawText(nX + 1, nY + 1, UINT32_MAX, ppStrings[i], (uint32_t)strlen(ppStrings[i])); MicroProfileDrawText(nX + 1, nY + 1, (uint32_t)-1, ppStrings[i], (uint32_t)strlen(ppStrings[i]));
nY += (MICROPROFILE_TEXT_HEIGHT+1); nY += (MICROPROFILE_TEXT_HEIGHT+1);
} }
} }
@ -780,7 +781,7 @@ void MicroProfileDrawDetailedContextSwitchBars(uint32_t nY, uint32_t nThreadId,
{ {
MicroProfile& S = *MicroProfileGet(); MicroProfile& S = *MicroProfileGet();
int64_t nTickIn = -1; int64_t nTickIn = -1;
uint32_t nThreadBefore = UINT32_MAX; uint32_t nThreadBefore = -1;
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu()); float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
float fMsToScreen = UI.nWidth / UI.fDetailedRange; float fMsToScreen = UI.nWidth / UI.fDetailedRange;
float fMouseX = (float)UI.nMouseX; float fMouseX = (float)UI.nMouseX;
@ -948,10 +949,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
uint32_t nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadAfter; uint32_t nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadAfter;
uint32_t nContextSwitchHoverThreadBefore = S.nContextSwitchHoverThreadBefore; uint32_t nContextSwitchHoverThreadBefore = S.nContextSwitchHoverThreadBefore;
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX; S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
uint32_t nContextSwitchStart = UINT32_MAX; uint32_t nContextSwitchStart = -1;
uint32_t nContextSwitchEnd = UINT32_MAX; uint32_t nContextSwitchEnd = -1;
S.nContextSwitchHoverCpuNext = 0xff; S.nContextSwitchHoverCpuNext = 0xff;
S.nContextSwitchHoverTickIn = -1; S.nContextSwitchHoverTickIn = -1;
S.nContextSwitchHoverTickOut = -1; S.nContextSwitchHoverTickOut = -1;
@ -1004,10 +1005,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
}while(pFrameLogFirst != pFrameFirst); }while(pFrameLogFirst != pFrameFirst);
if (nGet == UINT32_MAX) { if(nGet == (uint32_t)-1)
continue; continue;
} MP_ASSERT(nGet != (uint32_t)-1);
MP_ASSERT(nGet != UINT32_MAX);
nPut = pFrameLogLast->nLogStart[i]; nPut = pFrameLogLast->nLogStart[i];
@ -1023,9 +1023,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
int64_t nBaseTicks = bGpu ? nBaseTicksGpu : nBaseTicksCpu; int64_t nBaseTicks = bGpu ? nBaseTicksGpu : nBaseTicksCpu;
char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16]; char ThreadName[MicroProfileThreadLog::THREAD_MAX_LEN + 16];
uint64_t nThreadId = pLog->nThreadId; uint64_t nThreadId = pLog->nThreadId;
snprintf(ThreadName, sizeof(ThreadName)-1, "%04" PRIx64 ": %s", nThreadId, &pLog->ThreadName[0] ); snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s", nThreadId, &pLog->ThreadName[0] );
nY += 3; nY += 3;
uint32_t nThreadColor = UINT32_MAX; uint32_t nThreadColor = -1;
if(pLog->nThreadId == nContextSwitchHoverThreadAfter || pLog->nThreadId == nContextSwitchHoverThreadBefore) if(pLog->nThreadId == nContextSwitchHoverThreadAfter || pLog->nThreadId == nContextSwitchHoverThreadBefore)
nThreadColor = UI.nHoverColorShared|0x906060; nThreadColor = UI.nHoverColorShared|0x906060;
MicroProfileDrawText(0, nY, nThreadColor, &ThreadName[0], (uint32_t)strlen(&ThreadName[0])); MicroProfileDrawText(0, nY, nThreadColor, &ThreadName[0], (uint32_t)strlen(&ThreadName[0]));
@ -1048,7 +1048,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
uint32_t nEnd = nRange[j][1]; uint32_t nEnd = nRange[j][1];
for(uint32_t k = nStart; k < nEnd; ++k) for(uint32_t k = nStart; k < nEnd; ++k)
{ {
MicroProfileLogEntry* pEntry = &pLog->Log[k]; MicroProfileLogEntry* pEntry = pLog->Log + k;
int nType = MicroProfileLogType(*pEntry); int nType = MicroProfileLogType(*pEntry);
if(MP_LOG_ENTER == nType) if(MP_LOG_ENTER == nType)
{ {
@ -1066,7 +1066,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
continue; continue;
} }
MicroProfileLogEntry* pEntryEnter = &pLog->Log[nStack[nStackPos-1]]; MicroProfileLogEntry* pEntryEnter = pLog->Log + nStack[nStackPos-1];
if(MicroProfileLogTimerIndex(*pEntryEnter) != MicroProfileLogTimerIndex(*pEntry)) if(MicroProfileLogTimerIndex(*pEntryEnter) != MicroProfileLogTimerIndex(*pEntry))
{ {
//uprintf("mismatch %llx %llx\n", pEntryEnter->nToken, pEntry->nToken); //uprintf("mismatch %llx %llx\n", pEntryEnter->nToken, pEntry->nToken);
@ -1126,7 +1126,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
uint32_t nIntegerWidth = (uint32_t)(fXEnd - fXStart); uint32_t nIntegerWidth = (uint32_t)(fXEnd - fXStart);
if(nIntegerWidth) if(nIntegerWidth)
{ {
if(bHover && UI.nActiveMenu == UINT32_MAX) if(bHover && UI.nActiveMenu == -1)
{ {
nHoverToken = MicroProfileLogTimerIndex(*pEntry); nHoverToken = MicroProfileLogTimerIndex(*pEntry);
#if MICROPROFILE_DEBUG #if MICROPROFILE_DEBUG
@ -1146,7 +1146,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
int nCharacters = (nTextWidth - 2*MICROPROFILE_TEXT_WIDTH) / MICROPROFILE_TEXT_WIDTH; int nCharacters = (nTextWidth - 2*MICROPROFILE_TEXT_WIDTH) / MICROPROFILE_TEXT_WIDTH;
if(nCharacters>0) if(nCharacters>0)
{ {
MicroProfileDrawText(fXStartText + 1, fYStart + 1, UINT32_MAX, S.TimerInfo[nTimerIndex].pName, MicroProfileMin<uint32_t>(S.TimerInfo[nTimerIndex].nNameLen, nCharacters)); MicroProfileDrawText(fXStartText+1, fYStart+1, -1, S.TimerInfo[nTimerIndex].pName, MicroProfileMin<uint32_t>(S.TimerInfo[nTimerIndex].nNameLen, nCharacters));
} }
} }
#endif #endif
@ -1158,7 +1158,7 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
int nLineX = (int)floor(fXAvg+0.5f); int nLineX = (int)floor(fXAvg+0.5f);
if(nLineX != (int)nLinesDrawn[nStackPos]) if(nLineX != (int)nLinesDrawn[nStackPos])
{ {
if(bHover && UI.nActiveMenu == UINT32_MAX) if(bHover && UI.nActiveMenu == -1)
{ {
nHoverToken = (uint32_t)MicroProfileLogTimerIndex(*pEntry); nHoverToken = (uint32_t)MicroProfileLogTimerIndex(*pEntry);
nHoverTime = MicroProfileLogTickDifference(nTickStart, nTickEnd); nHoverTime = MicroProfileLogTickDifference(nTickStart, nTickEnd);
@ -1235,9 +1235,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
// nThreadId is 32-bit on Windows // nThreadId is 32-bit on Windows
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) ); int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04x: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
#else #else
int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04" PRIx64 ": %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) ); int nStrLen = snprintf(ThreadName, sizeof(ThreadName)-1, "%04llx: %s%s", nThreadId, cLocal, i < nNumThreadsBase ? &S.Pool[i]->ThreadName[0] : MICROPROFILE_THREAD_NAME_FROM_ID(nThreadId) );
#endif #endif
uint32_t nThreadColor = UINT32_MAX; uint32_t nThreadColor = -1;
if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore) if(nThreadId == nContextSwitchHoverThreadAfter || nThreadId == nContextSwitchHoverThreadBefore)
nThreadColor = UI.nHoverColorShared|0x906060; nThreadColor = UI.nHoverColorShared|0x906060;
MicroProfileDrawDetailedContextSwitchBars(nY+2, nThreadId, nContextSwitchStart, nContextSwitchEnd, nBaseTicksCpu, nBaseY); MicroProfileDrawDetailedContextSwitchBars(nY+2, nThreadId, nContextSwitchStart, nContextSwitchEnd, nBaseTicksCpu, nBaseY);
@ -1249,6 +1249,9 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
S.nContextSwitchHoverCpu = S.nContextSwitchHoverCpuNext; S.nContextSwitchHoverCpu = S.nContextSwitchHoverCpuNext;
UI.pDisplayMouseOver = pMouseOverNext; UI.pDisplayMouseOver = pMouseOverNext;
if(!S.nRunning) if(!S.nRunning)
@ -1283,10 +1286,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart); float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
float fStartTextX = fXStart - fStartTextWidth - 2; float fStartTextX = fXStart - fStartTextWidth - 2;
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart); MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd); uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd); MicroProfileDrawText(fXEnd+2, nBaseY+1, (uint32_t)-1, sBuffer, nLenEnd);
if(UI.nMouseRight) if(UI.nMouseRight)
{ {
@ -1313,10 +1316,10 @@ void MicroProfileDrawDetailedBars(uint32_t nWidth, uint32_t nHeight, int nBaseY,
float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart); float fStartTextWidth = (float)((1+MICROPROFILE_TEXT_WIDTH) * nLenStart);
float fStartTextX = fXStart - fStartTextWidth - 2; float fStartTextX = fXStart - fStartTextWidth - 2;
MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); MicroProfileDrawBox(fStartTextX, nBaseY, fStartTextX + fStartTextWidth + 2, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
MicroProfileDrawText(fStartTextX+1, nBaseY, UINT32_MAX, sBuffer, nLenStart); MicroProfileDrawText(fStartTextX+1, nBaseY, (uint32_t)-1, sBuffer, nLenStart);
uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd); uint32_t nLenEnd = snprintf(sBuffer, sizeof(sBuffer)-1, "%.2fms", fMsEnd);
MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat); MicroProfileDrawBox(fXEnd+1, nBaseY, fXEnd+1+(1+MICROPROFILE_TEXT_WIDTH) * nLenEnd + 3, MICROPROFILE_TEXT_HEIGHT + 2 + nBaseY, 0x33000000, MicroProfileBoxTypeFlat);
MicroProfileDrawText(fXEnd+2, nBaseY+1, UINT32_MAX, sBuffer, nLenEnd); MicroProfileDrawText(fXEnd+2, nBaseY+1, (uint32_t)-1, sBuffer, nLenEnd);
} }
} }
} }
@ -1362,7 +1365,7 @@ void MicroProfileDrawDetailedFrameHistory(uint32_t nWidth, uint32_t nHeight, uin
fBaseX = fXStart; fBaseX = fXStart;
uint32_t nColor = MICROPROFILE_FRAME_HISTORY_COLOR_CPU; uint32_t nColor = MICROPROFILE_FRAME_HISTORY_COLOR_CPU;
if(nIndex == nSelectedFrame) if(nIndex == nSelectedFrame)
nColor = UINT32_MAX; nColor = (uint32_t)-1;
MicroProfileDrawBox(fXStart, nBaseY + fScale * nBarHeight, fXEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, nColor, MicroProfileBoxTypeBar); MicroProfileDrawBox(fXStart, nBaseY + fScale * nBarHeight, fXEnd, nBaseY+MICROPROFILE_FRAME_HISTORY_HEIGHT, nColor, MicroProfileBoxTypeBar);
if(pNext->nFrameStartCpu > nCpuStart) if(pNext->nFrameStartCpu > nCpuStart)
{ {
@ -1384,7 +1387,7 @@ void MicroProfileDrawDetailedView(uint32_t nWidth, uint32_t nHeight)
uint32_t nBaseY = MICROPROFILE_TEXT_HEIGHT + 1; uint32_t nBaseY = MICROPROFILE_TEXT_HEIGHT + 1;
int nSelectedFrame = -1; int nSelectedFrame = -1;
if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == UINT32_MAX) if(UI.nMouseY > nBaseY && UI.nMouseY <= nBaseY + MICROPROFILE_FRAME_HISTORY_HEIGHT && UI.nActiveMenu == -1)
{ {
nSelectedFrame = ((MICROPROFILE_NUM_FRAMES) * (UI.nWidth-UI.nMouseX) / UI.nWidth); nSelectedFrame = ((MICROPROFILE_NUM_FRAMES) * (UI.nWidth-UI.nMouseX) / UI.nWidth);
@ -1422,7 +1425,7 @@ void MicroProfileDrawHeader(int32_t nX, uint32_t nWidth, const char* pName)
if(pName) if(pName)
{ {
MicroProfileDrawBox(nX-8, MICROPROFILE_TEXT_HEIGHT + 2, nX + nWidth+5, MICROPROFILE_TEXT_HEIGHT + 2 + (MICROPROFILE_TEXT_HEIGHT+1), 0xff000000|g_nMicroProfileBackColors[1]); MicroProfileDrawBox(nX-8, MICROPROFILE_TEXT_HEIGHT + 2, nX + nWidth+5, MICROPROFILE_TEXT_HEIGHT + 2 + (MICROPROFILE_TEXT_HEIGHT+1), 0xff000000|g_nMicroProfileBackColors[1]);
MicroProfileDrawText(nX, MICROPROFILE_TEXT_HEIGHT + 2, UINT32_MAX, pName, (uint32_t)strlen(pName)); MicroProfileDrawText(nX, MICROPROFILE_TEXT_HEIGHT + 2, (uint32_t)-1, pName, (uint32_t)strlen(pName));
} }
} }
@ -1437,7 +1440,7 @@ void MicroProfileLoopActiveGroupsDraw(int32_t nX, int32_t nY, const char* pName,
uint32_t nCount = 0; uint32_t nCount = 0;
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j) for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
{ {
uint64_t nMask = 1ULL << j; uint64_t nMask = 1ll << j;
if(nMask & nGroup) if(nMask & nGroup)
{ {
nY += MICROPROFILE_TEXT_HEIGHT + 1; nY += MICROPROFILE_TEXT_HEIGHT + 1;
@ -1518,7 +1521,7 @@ void MicroProfileCalcTimers(float* pTimers, float* pAverage, float* pMax, float*
} }
} }
} }
nMask <<= 1; nMask <<= 1ll;
} }
} }
@ -1540,7 +1543,7 @@ void MicroProfileDrawBarArrayCallback(uint32_t nTimer, uint32_t nIdx, uint64_t n
snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pTimers[nIdx]); snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pTimers[nIdx]);
if (!pTimers2) if (!pTimers2)
MicroProfileDrawBox(nX + nTextWidth, nY, nX + nTextWidth + fWidth * pTimers[nIdx+1], nY + nHeight, UI.nOpacityForeground|S.TimerInfo[nTimer].nColor, MicroProfileBoxTypeBar); MicroProfileDrawBox(nX + nTextWidth, nY, nX + nTextWidth + fWidth * pTimers[nIdx+1], nY + nHeight, UI.nOpacityForeground|S.TimerInfo[nTimer].nColor, MicroProfileBoxTypeBar);
MicroProfileDrawText(nX, nY, UINT32_MAX, sBuffer, (uint32_t)strlen(sBuffer)); MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, (uint32_t)strlen(sBuffer));
} }
@ -1561,7 +1564,7 @@ void MicroProfileDrawBarCallCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
MicroProfile& S = *MicroProfileGet(); MicroProfile& S = *MicroProfileGet();
char sBuffer[SBUF_MAX]; char sBuffer[SBUF_MAX];
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5d", S.Frame[nTimer].nCount);//fix int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5d", S.Frame[nTimer].nCount);//fix
MicroProfileDrawText(nX, nY, UINT32_MAX, sBuffer, nLen); MicroProfileDrawText(nX, nY, (uint32_t)-1, sBuffer, nLen);
} }
uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName) uint32_t MicroProfileDrawBarCallCount(int32_t nX, int32_t nY, const char* pName)
@ -1585,7 +1588,7 @@ void MicroProfileDrawBarMetaAverageCallback(uint32_t nTimer, uint32_t nIdx, uint
float fRcpFrames = pArgs->fRcpFrames; float fRcpFrames = pArgs->fRcpFrames;
char sBuffer[SBUF_MAX]; char sBuffer[SBUF_MAX];
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pCounters[nTimer] * fRcpFrames); int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5.2f", pCounters[nTimer] * fRcpFrames);
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen); MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
} }
uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight) uint32_t MicroProfileDrawBarMetaAverage(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
@ -1606,8 +1609,8 @@ void MicroProfileDrawBarMetaCountCallback(uint32_t nTimer, uint32_t nIdx, uint64
{ {
uint64_t* pCounters = (uint64_t*)pExtra; uint64_t* pCounters = (uint64_t*)pExtra;
char sBuffer[SBUF_MAX]; char sBuffer[SBUF_MAX];
int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5" PRIu64, pCounters[nTimer]); int nLen = snprintf(sBuffer, SBUF_MAX-1, "%5llu", pCounters[nTimer]);
MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, UINT32_MAX, sBuffer, nLen); MicroProfileDrawText(nX - nLen * (MICROPROFILE_TEXT_WIDTH+1), nY, (uint32_t)-1, sBuffer, nLen);
} }
uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight) uint32_t MicroProfileDrawBarMetaCount(int32_t nX, int32_t nY, uint64_t* pCounters, const char* pName, uint32_t nTotalHeight)
@ -1664,7 +1667,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
if(bMouseOver) if(bMouseOver)
{ {
float fXAvg = fMouseXPrc * MICROPROFILE_GRAPH_WIDTH + nX; float fXAvg = fMouseXPrc * MICROPROFILE_GRAPH_WIDTH + nX;
MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, UINT32_MAX); MicroProfileDrawLineVertical(fXAvg, nY, nY + MICROPROFILE_GRAPH_HEIGHT, (uint32_t)-1);
} }
@ -1703,7 +1706,7 @@ bool MicroProfileDrawGraph(uint32_t nScreenWidth, uint32_t nScreenHeight)
char buf[32]; char buf[32];
int nLen = snprintf(buf, sizeof(buf)-1, "%5.2fms", S.fReferenceTime); int nLen = snprintf(buf, sizeof(buf)-1, "%5.2fms", S.fReferenceTime);
MicroProfileDrawText(nX+1, fY1 - (2+MICROPROFILE_TEXT_HEIGHT), UINT32_MAX, buf, nLen); MicroProfileDrawText(nX+1, fY1 - (2+MICROPROFILE_TEXT_HEIGHT), (uint32_t)-1, buf, nLen);
} }
@ -1779,7 +1782,7 @@ void MicroProfileDumpTimers()
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j) for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
{ {
uint64_t nMask = 1ULL << j; uint64_t nMask = 1ll << j;
if(nMask & nActiveGroup) if(nMask & nActiveGroup)
{ {
MICROPROFILE_PRINTF("%s\n", S.GroupInfo[j].pName); MICROPROFILE_PRINTF("%s\n", S.GroupInfo[j].pName);
@ -1820,7 +1823,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
uint32_t nNumGroups = 0; uint32_t nNumGroups = 0;
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j) for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
{ {
if(nActiveGroup & (1ULL << j)) if(nActiveGroup & (1ll << j))
{ {
nNumTimers += S.GroupInfo[j].nNumTimers; nNumTimers += S.GroupInfo[j].nNumTimers;
nNumGroups += 1; nNumGroups += 1;
@ -1875,7 +1878,7 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i) for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
{ {
uint32_t nY0 = nY + i * (nHeight + 1); uint32_t nY0 = nY + i * (nHeight + 1);
bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1))); bool bInside = (UI.nActiveMenu == -1) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
MicroProfileDrawBox(nX, nY0, nWidth+nX, nY0 + (nHeight+1)+1, UI.nOpacityBackground | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0))); MicroProfileDrawBox(nX, nY0, nWidth+nX, nY0 + (nHeight+1)+1, UI.nOpacityBackground | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
} }
nX += 10; nX += 10;
@ -1924,22 +1927,22 @@ void MicroProfileDrawBarView(uint32_t nScreenWidth, uint32_t nScreenHeight)
nY = nHeight + 3 - UI.nOffsetY; nY = nHeight + 3 - UI.nOffsetY;
for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i) for(uint32_t i = 0; i < nNumTimers+nNumGroups+1; ++i)
{ {
const uint32_t nY0 = nY + i * (nHeight + 1); uint32_t nY0 = nY + i * (nHeight + 1);
const bool bInside = (UI.nActiveMenu == UINT32_MAX) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1))); bool bInside = (UI.nActiveMenu == -1) && ((UI.nMouseY >= nY0) && (UI.nMouseY < (nY0 + nHeight + 1)));
MicroProfileDrawBox(nX, nY0, nTimerWidth, nY0 + (nHeight+1)+1, 0xff0000000 | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0))); MicroProfileDrawBox(nX, nY0, nTimerWidth, nY0 + (nHeight+1)+1, 0xff0000000 | (g_nMicroProfileBackColors[nColorIndex++ & 1] + ((bInside) ? 0x002c2c2c : 0)));
} }
nX += MicroProfileDrawBarLegend(nX, nY, nTotalHeight, nTimerWidth-5) + 1; nX += MicroProfileDrawBarLegend(nX, nY, nTotalHeight, nTimerWidth-5) + 1;
for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j) for(uint32_t j = 0; j < MICROPROFILE_MAX_GROUPS; ++j)
{ {
if(nActiveGroup & (1ULL << j)) if(nActiveGroup & (1ll << j))
{ {
MicroProfileDrawText(nX, nY + (1+nHeight) * nLegendOffset, UINT32_MAX, S.GroupInfo[j].pName, S.GroupInfo[j].nNameLen); MicroProfileDrawText(nX, nY + (1+nHeight) * nLegendOffset, (uint32_t)-1, S.GroupInfo[j].pName, S.GroupInfo[j].nNameLen);
nLegendOffset += S.GroupInfo[j].nNumTimers+1; nLegendOffset += S.GroupInfo[j].nNumTimers+1;
} }
} }
MicroProfileDrawHeader(nX, nTimerWidth-5, "Group"); MicroProfileDrawHeader(nX, nTimerWidth-5, "Group");
MicroProfileDrawTextRight(nTimerWidth-3, MICROPROFILE_TEXT_HEIGHT + 2, UINT32_MAX, "Timer", 5); MicroProfileDrawTextRight(nTimerWidth-3, MICROPROFILE_TEXT_HEIGHT + 2, (uint32_t)-1, "Timer", 5);
MicroProfileDrawLineVertical(nTimerWidth, 0, nTotalHeight+nY, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]); MicroProfileDrawLineVertical(nTimerWidth, 0, nTotalHeight+nY, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
MicroProfileDrawLineHorizontal(0, nWidth, 2*MICROPROFILE_TEXT_HEIGHT + 3, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]); MicroProfileDrawLineHorizontal(0, nWidth, 2*MICROPROFILE_TEXT_HEIGHT + 3, UI.nOpacityBackground|g_nMicroProfileBackColors[0]|g_nMicroProfileBackColors[1]);
} }
@ -2000,7 +2003,7 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
} }
else else
{ {
*bSelected = 0 != (S.nActiveGroupWanted & (1ULL << Item.nIndex)); *bSelected = 0 != (S.nActiveGroupWanted & (1ll << Item.nIndex));
snprintf(buffer, sizeof(buffer)-1, " %s", Item.pName); snprintf(buffer, sizeof(buffer)-1, " %s", Item.pName);
} }
return buffer; return buffer;
@ -2012,18 +2015,16 @@ const char* MicroProfileUIMenuGroups(int nIndex, bool* bSelected)
const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected) const char* MicroProfileUIMenuAggregate(int nIndex, bool* bSelected)
{ {
MicroProfile& S = *MicroProfileGet(); MicroProfile& S = *MicroProfileGet();
if(static_cast<uint32_t>(nIndex) < g_MicroProfileAggregatePresets.size()) if(nIndex < sizeof(g_MicroProfileAggregatePresets)/sizeof(g_MicroProfileAggregatePresets[0]))
{ {
uint32_t val = g_MicroProfileAggregatePresets[nIndex]; int val = g_MicroProfileAggregatePresets[nIndex];
*bSelected = S.nAggregateFlip == val; *bSelected = (int)S.nAggregateFlip == val;
if (0 == val) if(0 == val)
{
return "Infinite"; return "Infinite";
}
else else
{ {
static char buf[128]; static char buf[128];
snprintf(buf, sizeof(buf)-1, "%7u", val); snprintf(buf, sizeof(buf)-1, "%7d", val);
return buf; return buf;
} }
} }
@ -2097,13 +2098,11 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
{ {
static char buf[128]; static char buf[128];
*bSelected = false; *bSelected = false;
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size()); int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
int nIndexSave = nIndex - nNumPresets - 1; int nIndexSave = nIndex - nNumPresets - 1;
if (nIndex == nNumPresets) if(nIndex == nNumPresets)
{
return "--"; return "--";
} else if(nIndexSave >=0 && nIndexSave <nNumPresets)
else if(nIndexSave >=0 && nIndexSave < nNumPresets)
{ {
snprintf(buf, sizeof(buf)-1, "Save '%s'", g_MicroProfilePresetNames[nIndexSave]); snprintf(buf, sizeof(buf)-1, "Save '%s'", g_MicroProfilePresetNames[nIndexSave]);
return buf; return buf;
@ -2121,13 +2120,13 @@ const char* MicroProfileUIMenuPreset(int nIndex, bool* bSelected)
const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected) const char* MicroProfileUIMenuCustom(int nIndex, bool* bSelected)
{ {
if(UINT32_MAX == UI.nCustomActive) if((uint32_t)-1 == UI.nCustomActive)
{ {
*bSelected = nIndex == 0; *bSelected = nIndex == 0;
} }
else else
{ {
*bSelected = nIndex-2 == static_cast<int>(UI.nCustomActive); *bSelected = nIndex-2 == UI.nCustomActive;
} }
switch(nIndex) switch(nIndex)
{ {
@ -2203,7 +2202,7 @@ void MicroProfileUIClickGroups(int nIndex)
else else
{ {
MP_ASSERT(Item.nIndex < S.nGroupCount); MP_ASSERT(Item.nIndex < S.nGroupCount);
S.nActiveGroupWanted ^= (1ULL << Item.nIndex); S.nActiveGroupWanted ^= (1ll << Item.nIndex);
} }
} }
} }
@ -2274,7 +2273,7 @@ void MicroProfileUIClickOptions(int nIndex)
void MicroProfileUIClickPreset(int nIndex) void MicroProfileUIClickPreset(int nIndex)
{ {
int nNumPresets = static_cast<int>(g_MicroProfilePresetNames.size()); int nNumPresets = sizeof(g_MicroProfilePresetNames) / sizeof(g_MicroProfilePresetNames[0]);
int nIndexSave = nIndex - nNumPresets - 1; int nIndexSave = nIndex - nNumPresets - 1;
if(nIndexSave >= 0 && nIndexSave < nNumPresets) if(nIndexSave >= 0 && nIndexSave < nNumPresets)
{ {
@ -2311,7 +2310,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
uint32_t nX = 0; uint32_t nX = 0;
uint32_t nY = 0; uint32_t nY = 0;
bool bMouseOver = UI.nMouseY < MICROPROFILE_TEXT_HEIGHT + 1;
#define SBUF_SIZE 256 #define SBUF_SIZE 256
char buffer[256]; char buffer[256];
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + (MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff000000|g_nMicroProfileBackColors[1]); MicroProfileDrawBox(nX, nY, nX + nWidth, nY + (MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff000000|g_nMicroProfileBackColors[1]);
@ -2322,7 +2321,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
uint32_t nNumMenuItems = 0; uint32_t nNumMenuItems = 0;
int nLen = snprintf(buffer, 127, "MicroProfile"); int nLen = snprintf(buffer, 127, "MicroProfile");
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen); MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1); nX += (sizeof("MicroProfile")+2) * (MICROPROFILE_TEXT_WIDTH+1);
pMenuText[nNumMenuItems++] = "Mode"; pMenuText[nNumMenuItems++] = "Mode";
pMenuText[nNumMenuItems++] = "Groups"; pMenuText[nNumMenuItems++] = "Groups";
@ -2410,7 +2409,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
}; };
uint32_t nSelectMenu = UINT32_MAX; uint32_t nSelectMenu = (uint32_t)-1;
for(uint32_t i = 0; i < nNumMenuItems; ++i) for(uint32_t i = 0; i < nNumMenuItems; ++i)
{ {
nMenuX[i] = nX; nMenuX[i] = nX;
@ -2420,17 +2419,17 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
{ {
MicroProfileDrawBox(nX-1, nY, nX + nLen * (MICROPROFILE_TEXT_WIDTH+1), nY +(MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff888888); MicroProfileDrawBox(nX-1, nY, nX + nLen * (MICROPROFILE_TEXT_WIDTH+1), nY +(MICROPROFILE_TEXT_HEIGHT+1)+1, 0xff888888);
nSelectMenu = i; nSelectMenu = i;
if((UI.nMouseLeft || UI.nMouseRight) && i == (uint32_t)nPauseIndex) if((UI.nMouseLeft || UI.nMouseRight) && i == (int)nPauseIndex)
{ {
S.nToggleRunning = 1; S.nToggleRunning = 1;
} }
} }
MicroProfileDrawText(nX, nY, UINT32_MAX, pMenuText[i], (uint32_t)strlen(pMenuText[i])); MicroProfileDrawText(nX, nY, (uint32_t)-1, pMenuText[i], (uint32_t)strlen(pMenuText[i]));
nX += (nLen+1) * (MICROPROFILE_TEXT_WIDTH+1); nX += (nLen+1) * (MICROPROFILE_TEXT_WIDTH+1);
} }
uint32_t nMenu = nSelectMenu != UINT32_MAX ? nSelectMenu : UI.nActiveMenu; uint32_t nMenu = nSelectMenu != (uint32_t)-1 ? nSelectMenu : UI.nActiveMenu;
UI.nActiveMenu = nMenu; UI.nActiveMenu = nMenu;
if(UINT32_MAX != nMenu) if((uint32_t)-1 != nMenu)
{ {
nX = nMenuX[nMenu]; nX = nMenuX[nMenu];
nY += MICROPROFILE_TEXT_HEIGHT+1; nY += MICROPROFILE_TEXT_HEIGHT+1;
@ -2451,9 +2450,9 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
{ {
UI.nActiveMenu = nMenu; UI.nActiveMenu = nMenu;
} }
else if(nSelectMenu == UINT32_MAX) else if(nSelectMenu == (uint32_t)-1)
{ {
UI.nActiveMenu = UINT32_MAX; UI.nActiveMenu = (uint32_t)-1;
} }
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000|g_nMicroProfileBackColors[1]); MicroProfileDrawBox(nX, nY, nX + nWidth, nY + nHeight, 0xff000000|g_nMicroProfileBackColors[1]);
for(int i = 0; i < nNumLines; ++i) for(int i = 0; i < nNumLines; ++i)
@ -2462,6 +2461,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
const char* pString = CB(i, &bSelected); const char* pString = CB(i, &bSelected);
if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1) if(UI.nMouseY >= nY && UI.nMouseY < nY + MICROPROFILE_TEXT_HEIGHT + 1)
{ {
bMouseOver = true;
if(UI.nMouseLeft || UI.nMouseRight) if(UI.nMouseLeft || UI.nMouseRight)
{ {
CBClick[nMenu](i); CBClick[nMenu](i);
@ -2469,7 +2469,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
MicroProfileDrawBox(nX, nY, nX + nWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888); MicroProfileDrawBox(nX, nY, nX + nWidth, nY + MICROPROFILE_TEXT_HEIGHT + 1, 0xff888888);
} }
int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString); int nLen = snprintf(buffer, SBUF_SIZE-1, "%c %s", bSelected ? '*' : ' ' ,pString);
MicroProfileDrawText(nX, nY, UINT32_MAX, buffer, nLen); MicroProfileDrawText(nX, nY, (uint32_t)-1, buffer, nLen);
nY += MICROPROFILE_TEXT_HEIGHT+1; nY += MICROPROFILE_TEXT_HEIGHT+1;
} }
} }
@ -2484,7 +2484,7 @@ void MicroProfileDrawMenu(uint32_t nWidth, uint32_t nHeight)
float fMaxMs = fToMs * S.nFlipMaxDisplay; float fMaxMs = fToMs * S.nFlipMaxDisplay;
int nLen = snprintf(FrameTimeMessage, sizeof(FrameTimeMessage)-1, "Time[%6.2f] Avg[%6.2f] Max[%6.2f]", fMs, fAverageMs, fMaxMs); int nLen = snprintf(FrameTimeMessage, sizeof(FrameTimeMessage)-1, "Time[%6.2f] Avg[%6.2f] Max[%6.2f]", fMs, fAverageMs, fMaxMs);
pMenuText[nNumMenuItems++] = &FrameTimeMessage[0]; pMenuText[nNumMenuItems++] = &FrameTimeMessage[0];
MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, UINT32_MAX, FrameTimeMessage, nLen); MicroProfileDrawText(nWidth - nLen * (MICROPROFILE_TEXT_WIDTH+1), 0, -1, FrameTimeMessage, nLen);
} }
} }
@ -2538,7 +2538,7 @@ void MicroProfileMoveGraph()
void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight) void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
{ {
if(UINT32_MAX != UI.nCustomActive) if((uint32_t)-1 != UI.nCustomActive)
{ {
MicroProfile& S = *MicroProfileGet(); MicroProfile& S = *MicroProfileGet();
MP_ASSERT(UI.nCustomActive < MICROPROFILE_CUSTOM_MAX); MP_ASSERT(UI.nCustomActive < MICROPROFILE_CUSTOM_MAX);
@ -2571,8 +2571,8 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
pColors[i] = S.TimerInfo[nTimerIndex].nColor; pColors[i] = S.TimerInfo[nTimerIndex].nColor;
} }
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 3*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Avg", sizeof("Avg")-1); MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 3*MICROPROFILE_TEXT_WIDTH, nOffsetY, (uint32_t)-1, "Avg", sizeof("Avg")-1);
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 13*MICROPROFILE_TEXT_WIDTH, nOffsetY, UINT32_MAX, "Max", sizeof("Max")-1); MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING + 13*MICROPROFILE_TEXT_WIDTH, nOffsetY, (uint32_t)-1, "Max", sizeof("Max")-1);
for(uint32_t i = 0; i < nCount; ++i) for(uint32_t i = 0; i < nCount; ++i)
{ {
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
@ -2582,10 +2582,10 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
int nSize; int nSize;
uint32_t nOffsetX = MICROPROFILE_CUSTOM_PADDING; uint32_t nOffsetX = MICROPROFILE_CUSTOM_PADDING;
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeAvg[i]); nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeAvg[i]);
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize); MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1); nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeMax[i]); nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2f", pTimeMax[i]);
MicroProfileDrawText(nOffsetX, nOffsetY, UINT32_MAX, Buffer, nSize); MicroProfileDrawText(nOffsetX, nOffsetY, (uint32_t)-1, Buffer, nSize);
nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1); nOffsetX += (nSize+2) * (MICROPROFILE_TEXT_WIDTH+1);
nSize = snprintf(Buffer, sizeof(Buffer)-1, "%s:%s", S.GroupInfo[nGroupIndex].pName, pTimerInfo->pName); nSize = snprintf(Buffer, sizeof(Buffer)-1, "%s:%s", S.GroupInfo[nGroupIndex].pName, pTimerInfo->pName);
MicroProfileDrawText(nOffsetX, nOffsetY, pTimerInfo->nColor, Buffer, nSize); MicroProfileDrawText(nOffsetX, nOffsetY, pTimerInfo->nColor, Buffer, nSize);
@ -2599,9 +2599,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
nOffsetY = nOffsetYBase; nOffsetY = nOffsetYBase;
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg; float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? pTimeMax : pTimeAvg;
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg"; const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_BAR_SOURCE_MAX ? "Max" : "Avg";
MicroProfileDrawText(nMaxOffsetX, nOffsetY, UINT32_MAX, pString, static_cast<uint32_t>(strlen(pString))); MicroProfileDrawText(nMaxOffsetX, nOffsetY, (uint32_t)-1, pString, strlen(pString));
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference); int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, UINT32_MAX, Buffer, nSize); MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize);
for(uint32_t i = 0; i < nCount; ++i) for(uint32_t i = 0; i < nCount; ++i)
{ {
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
@ -2613,9 +2613,9 @@ void MicroProfileDrawCustom(uint32_t nWidth, uint32_t nHeight)
{ {
nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT); nOffsetY += 2*(1+MICROPROFILE_TEXT_HEIGHT);
const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg"; const char* pString = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? "Max" : "Avg";
MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, UINT32_MAX, pString, static_cast<uint32_t>(strlen(pString))); MicroProfileDrawText(MICROPROFILE_CUSTOM_PADDING, nOffsetY, (uint32_t)-1, pString, strlen(pString));
int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference); int nSize = snprintf(Buffer, sizeof(Buffer)-1, "%6.2fms", fReference);
MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, UINT32_MAX, Buffer, nSize); MicroProfileDrawText(nReducedWidth - (1+nSize) * (MICROPROFILE_TEXT_WIDTH+1), nOffsetY, (uint32_t)-1, Buffer, nSize);
nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT); nOffsetY += (1+MICROPROFILE_TEXT_HEIGHT);
float fPosX = MICROPROFILE_CUSTOM_PADDING; float fPosX = MICROPROFILE_CUSTOM_PADDING;
float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? pTimeMax : pTimeAvg; float* pMs = pCustom->nFlags & MICROPROFILE_CUSTOM_STACK_SOURCE_MAX ? pTimeMax : pTimeAvg;
@ -2668,7 +2668,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
UI.nHoverTime = 0; UI.nHoverTime = 0;
UI.nHoverFrame = -1; UI.nHoverFrame = -1;
if(S.nDisplay != MP_DRAW_DETAILED) if(S.nDisplay != MP_DRAW_DETAILED)
S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = UINT32_MAX; S.nContextSwitchHoverThread = S.nContextSwitchHoverThreadAfter = S.nContextSwitchHoverThreadBefore = -1;
MicroProfileMoveGraph(); MicroProfileMoveGraph();
@ -2798,13 +2798,13 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
if(UI.nActiveMenu == UINT32_MAX && !bMouseOverGraph) if(UI.nActiveMenu == -1 && !bMouseOverGraph)
{ {
if(UI.nHoverToken != MICROPROFILE_INVALID_TOKEN) if(UI.nHoverToken != MICROPROFILE_INVALID_TOKEN)
{ {
MicroProfileDrawFloatTooltip(UI.nMouseX, UI.nMouseY, UI.nHoverToken, UI.nHoverTime); MicroProfileDrawFloatTooltip(UI.nMouseX, UI.nMouseY, UI.nHoverToken, UI.nHoverTime);
} }
else if(S.nContextSwitchHoverThreadAfter != UINT32_MAX && S.nContextSwitchHoverThreadBefore != UINT32_MAX) else if(S.nContextSwitchHoverThreadAfter != -1 && S.nContextSwitchHoverThreadBefore != -1)
{ {
float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu()); float fToMs = MicroProfileTickToMsMultiplier(MicroProfileTicksPerSecondCpu());
MicroProfileStringArray ToolTip; MicroProfileStringArray ToolTip;
@ -2820,7 +2820,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
MicroProfileStringArrayFormat(&ToolTip, "%6.2fms", fToMs * nDifference ); MicroProfileStringArrayFormat(&ToolTip, "%6.2fms", fToMs * nDifference );
MicroProfileStringArrayAddLiteral(&ToolTip, "CPU"); MicroProfileStringArrayAddLiteral(&ToolTip, "CPU");
MicroProfileStringArrayFormat(&ToolTip, "%d", S.nContextSwitchHoverCpu); MicroProfileStringArrayFormat(&ToolTip, "%d", S.nContextSwitchHoverCpu);
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, UINT32_MAX); MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, -1);
} }
@ -2858,7 +2858,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
} }
} }
#endif #endif
MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, UINT32_MAX); MicroProfileDrawFloatWindow(UI.nMouseX, UI.nMouseY+20, &ToolTip.ppStrings[0], ToolTip.nNumStrings, -1);
} }
if(UI.nMouseLeft) if(UI.nMouseLeft)
{ {
@ -2883,7 +2883,7 @@ void MicroProfileDraw(uint32_t nWidth, uint32_t nHeight)
#endif #endif
m.unlock(); m.unlock();
} }
else if(UI.nCustomActive != UINT32_MAX) else if(UI.nCustomActive != (uint32_t)-1)
{ {
std::recursive_mutex& m = MicroProfileGetMutex(); std::recursive_mutex& m = MicroProfileGetMutex();
m.lock(); m.lock();
@ -3179,7 +3179,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
{ {
if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName)) if(0 == MP_STRCASECMP(pGroupName, S.GroupInfo[j].pName))
{ {
S.nActiveGroupWanted |= (1ULL << j); S.nActiveGroupWanted |= (1ll << j);
} }
} }
} }
@ -3212,7 +3212,7 @@ void MicroProfileLoadPreset(const char* pSuffix)
uint64_t nGroupIndex = S.TimerInfo[j].nGroupIndex; uint64_t nGroupIndex = S.TimerInfo[j].nGroupIndex;
if(0 == MP_STRCASECMP(pGraphName, S.TimerInfo[j].pName) && 0 == MP_STRCASECMP(pGraphGroupName, S.GroupInfo[nGroupIndex].pName)) if(0 == MP_STRCASECMP(pGraphName, S.TimerInfo[j].pName) && 0 == MP_STRCASECMP(pGraphGroupName, S.GroupInfo[nGroupIndex].pName))
{ {
MicroProfileToken nToken = MicroProfileMakeToken(1ULL << nGroupIndex, (uint16_t)j); MicroProfileToken nToken = MicroProfileMakeToken(1ll << nGroupIndex, (uint16_t)j);
S.Graph[i].nToken = nToken; // note: group index is stored here but is checked without in MicroProfileToggleGraph()! S.Graph[i].nToken = nToken; // note: group index is stored here but is checked without in MicroProfileToggleGraph()!
S.TimerInfo[j].bGraph = true; S.TimerInfo[j].bGraph = true;
if(nToken != nPrevToken) if(nToken != nPrevToken)
@ -3235,7 +3235,7 @@ uint32_t MicroProfileCustomGroupFind(const char* pCustomName)
return i; return i;
} }
} }
return UINT32_MAX; return (uint32_t)-1;
} }
uint32_t MicroProfileCustomGroup(const char* pCustomName) uint32_t MicroProfileCustomGroup(const char* pCustomName)
@ -3251,7 +3251,7 @@ uint32_t MicroProfileCustomGroup(const char* pCustomName)
uint32_t nIndex = UI.nCustomCount; uint32_t nIndex = UI.nCustomCount;
UI.nCustomCount++; UI.nCustomCount++;
memset(&UI.Custom[nIndex], 0, sizeof(UI.Custom[nIndex])); memset(&UI.Custom[nIndex], 0, sizeof(UI.Custom[nIndex]));
size_t nLen = strlen(pCustomName); uint32_t nLen = (uint32_t)strlen(pCustomName);
if(nLen > MICROPROFILE_NAME_MAX_LEN-1) if(nLen > MICROPROFILE_NAME_MAX_LEN-1)
nLen = MICROPROFILE_NAME_MAX_LEN-1; nLen = MICROPROFILE_NAME_MAX_LEN-1;
memcpy(&UI.Custom[nIndex].pName[0], pCustomName, nLen); memcpy(&UI.Custom[nIndex].pName[0], pCustomName, nLen);
@ -3309,7 +3309,7 @@ void MicroProfileCustomGroupEnable(uint32_t nIndex)
void MicroProfileCustomGroupToggle(const char* pCustomName) void MicroProfileCustomGroupToggle(const char* pCustomName)
{ {
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName); uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
if(nIndex == UINT32_MAX || nIndex == UI.nCustomActive) if(nIndex == (uint32_t)-1 || nIndex == UI.nCustomActive)
{ {
MicroProfileCustomGroupDisable(); MicroProfileCustomGroupDisable();
} }
@ -3328,13 +3328,13 @@ void MicroProfileCustomGroupDisable()
{ {
MicroProfile& S = *MicroProfileGet(); MicroProfile& S = *MicroProfileGet();
S.nForceGroupUI = 0; S.nForceGroupUI = 0;
UI.nCustomActive = UINT32_MAX; UI.nCustomActive = (uint32_t)-1;
} }
void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer) void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup, const char* pTimer)
{ {
uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName); uint32_t nIndex = MicroProfileCustomGroupFind(pCustomName);
if(UINT32_MAX == nIndex) if((uint32_t)-1 == nIndex)
{ {
return; return;
} }
@ -3344,7 +3344,7 @@ void MicroProfileCustomGroupAddTimer(const char* pCustomName, const char* pGroup
MP_ASSERT(nToken != MICROPROFILE_INVALID_TOKEN); //Timer must be registered first. MP_ASSERT(nToken != MICROPROFILE_INVALID_TOKEN); //Timer must be registered first.
UI.Custom[nIndex].pTimers[nTimerIndex] = nToken; UI.Custom[nIndex].pTimers[nTimerIndex] = nToken;
uint16_t nGroup = MicroProfileGetGroupIndex(nToken); uint16_t nGroup = MicroProfileGetGroupIndex(nToken);
UI.Custom[nIndex].nGroupMask |= (1ULL << nGroup); UI.Custom[nIndex].nGroupMask |= (1ll << nGroup);
UI.Custom[nIndex].nNumTimers++; UI.Custom[nIndex].nNumTimers++;
} }

2
externals/xbyak vendored

@ -1 +1 @@
Subproject commit c306b8e5786eeeb87b8925a8af5c3bf057ff5a90 Subproject commit 1de435ed04c8e74775804da944d176baf0ce56e2

2
externals/zstd vendored

@ -1 +1 @@
Subproject commit 97a3da1df009d4dc67251de0c4b1c9d7fe286fc1 Subproject commit 10f0e6993f9d2f682da6d04aa2385b7d53cbb4ee

View File

@ -35,6 +35,8 @@ if (MSVC)
add_compile_options( add_compile_options(
/W3 /W3
/MP /MP
/Zi
/Zo
/permissive- /permissive-
/EHsc /EHsc
/volatile:iso /volatile:iso
@ -47,15 +49,6 @@ if (MSVC)
/external:W0 /external:W0
) )
# Since MSVC's debugging information is not very deterministic, so we have to disable it
# when using ccache or other caching tools
if (NOT USE_CCACHE)
add_compile_options(
/Zi
/Zo
)
endif()
# /GS- - No stack buffer overflow checks # /GS- - No stack buffer overflow checks
add_compile_options("$<$<CONFIG:Release>:/GS->") add_compile_options("$<$<CONFIG:Release>:/GS->")

View File

@ -31,7 +31,7 @@ android {
// TODO If this is ever modified, change application_id in strings.xml // TODO If this is ever modified, change application_id in strings.xml
applicationId "org.citra.citra_emu" applicationId "org.citra.citra_emu"
minSdkVersion 26 minSdkVersion 26
targetSdkVersion 29 targetSdkVersion 28
versionCode autoVersion versionCode autoVersion
versionName getVersion() versionName getVersion()
ndk.abiFilters abiFilter ndk.abiFilters abiFilter
@ -121,7 +121,7 @@ dependencies {
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
implementation 'com.android.billingclient:billing:2.0.3' implementation 'com.android.billingclient:billing:2.2.0'
} }
def getVersion() { def getVersion() {

View File

@ -28,8 +28,7 @@
android:allowBackup="false" android:allowBackup="false"
android:supportsRtl="true" android:supportsRtl="true"
android:isGame="true" android:isGame="true"
android:banner="@mipmap/ic_launcher" android:banner="@mipmap/ic_launcher">
android:requestLegacyExternalStorage="true">
<activity <activity
android:name="org.citra.citra_emu.ui.main.MainActivity" android:name="org.citra.citra_emu.ui.main.MainActivity"

View File

@ -6,11 +6,8 @@
package org.citra.citra_emu; package org.citra.citra_emu;
import android.app.Activity;
import android.app.Dialog;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Bundle;
import android.text.Html; import android.text.Html;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.view.Surface; import android.view.Surface;
@ -19,21 +16,15 @@ import android.widget.EditText;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.fragment.app.DialogFragment;
import org.citra.citra_emu.activities.EmulationActivity; import org.citra.citra_emu.activities.EmulationActivity;
import org.citra.citra_emu.applets.SoftwareKeyboard;
import org.citra.citra_emu.utils.EmulationMenuSettings; import org.citra.citra_emu.utils.EmulationMenuSettings;
import org.citra.citra_emu.utils.Log; import org.citra.citra_emu.utils.Log;
import org.citra.citra_emu.utils.PermissionsHandler; import org.citra.citra_emu.utils.PermissionsHandler;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.Date;
import java.util.Objects;
import static android.Manifest.permission.CAMERA; import static android.Manifest.permission.CAMERA;
import static android.Manifest.permission.RECORD_AUDIO; import static android.Manifest.permission.RECORD_AUDIO;
@ -218,114 +209,6 @@ public final class NativeLibrary {
*/ */
public static native void SwapScreens(boolean swap_screens, int rotation); public static native void SwapScreens(boolean swap_screens, int rotation);
public enum CoreError {
ErrorSystemFiles,
ErrorSavestate,
ErrorUnknown,
}
private static boolean coreErrorAlertResult = false;
private static final Object coreErrorAlertLock = new Object();
public static class CoreErrorDialogFragment extends DialogFragment {
static CoreErrorDialogFragment newInstance(String title, String message) {
CoreErrorDialogFragment frag = new CoreErrorDialogFragment();
Bundle args = new Bundle();
args.putString("title", title);
args.putString("message", message);
frag.setArguments(args);
return frag;
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Activity emulationActivity = Objects.requireNonNull(getActivity());
final String title = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("title"));
final String message = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("message"));
return new AlertDialog.Builder(emulationActivity)
.setTitle(title)
.setMessage(message)
.setPositiveButton(R.string.continue_button, (dialog, which) -> {
coreErrorAlertResult = true;
synchronized (coreErrorAlertLock) {
coreErrorAlertLock.notify();
}
})
.setNegativeButton(R.string.abort_button, (dialog, which) -> {
coreErrorAlertResult = false;
synchronized (coreErrorAlertLock) {
coreErrorAlertLock.notify();
}
}).setOnDismissListener(dialog -> {
coreErrorAlertResult = true;
synchronized (coreErrorAlertLock) {
coreErrorAlertLock.notify();
}
}).create();
}
}
private static void OnCoreErrorImpl(String title, String message) {
final EmulationActivity emulationActivity = sEmulationActivity.get();
if (emulationActivity == null) {
Log.error("[NativeLibrary] EmulationActivity not present");
return;
}
CoreErrorDialogFragment fragment = CoreErrorDialogFragment.newInstance(title, message);
fragment.show(emulationActivity.getSupportFragmentManager(), "coreError");
}
/**
* Handles a core error.
* @return true: continue; false: abort
*/
public static boolean OnCoreError(CoreError error, String details) {
final EmulationActivity emulationActivity = sEmulationActivity.get();
if (emulationActivity == null) {
Log.error("[NativeLibrary] EmulationActivity not present");
return false;
}
String title, message;
switch (error) {
case ErrorSystemFiles: {
title = emulationActivity.getString(R.string.system_archive_not_found);
message = emulationActivity.getString(R.string.system_archive_not_found_message, details.isEmpty() ? emulationActivity.getString(R.string.system_archive_general) : details);
break;
}
case ErrorSavestate: {
title = emulationActivity.getString(R.string.save_load_error);
message = details;
break;
}
case ErrorUnknown: {
title = emulationActivity.getString(R.string.fatal_error);
message = emulationActivity.getString(R.string.fatal_error_message);
break;
}
default: {
return true;
}
}
// Show the AlertDialog on the main thread.
emulationActivity.runOnUiThread(() -> OnCoreErrorImpl(title, message));
// Wait for the lock to notify that it is complete.
synchronized (coreErrorAlertLock) {
try {
coreErrorAlertLock.wait();
} catch (Exception ignored) {
}
}
return coreErrorAlertResult;
}
public static boolean isPortraitMode() { public static boolean isPortraitMode() {
return CitraApplication.getAppContext().getResources().getConfiguration().orientation == return CitraApplication.getAppContext().getResources().getConfiguration().orientation ==
Configuration.ORIENTATION_PORTRAIT; Configuration.ORIENTATION_PORTRAIT;
@ -604,19 +487,6 @@ public final class NativeLibrary {
public static native void InstallCIAS(String[] path); public static native void InstallCIAS(String[] path);
public static final int SAVESTATE_SLOT_COUNT = 10;
public static final class SavestateInfo {
public int slot;
public Date time;
}
@Nullable
public static native SavestateInfo[] GetSavestateInfo();
public static native void SaveState(int slot);
public static native void LoadState(int slot);
/** /**
* Button type for use in onTouchEvent * Button type for use in onTouchEvent
*/ */

View File

@ -14,9 +14,7 @@ import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.SubMenu;
import android.view.View; import android.view.View;
import android.widget.CheckBox;
import android.widget.SeekBar; import android.widget.SeekBar;
import android.widget.TextView; import android.widget.TextView;
@ -27,7 +25,6 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.NotificationManagerCompat; import androidx.core.app.NotificationManagerCompat;
import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentActivity;
import org.citra.citra_emu.CitraApplication;
import org.citra.citra_emu.NativeLibrary; import org.citra.citra_emu.NativeLibrary;
import org.citra.citra_emu.R; import org.citra.citra_emu.R;
import org.citra.citra_emu.features.settings.model.view.InputBindingSetting; import org.citra.citra_emu.features.settings.model.view.InputBindingSetting;
@ -229,9 +226,9 @@ public final class EmulationActivity extends AppCompatActivity {
finish(); finish();
}) })
.setNegativeButton(android.R.string.cancel, (dialogInterface, i) -> .setNegativeButton(android.R.string.cancel, (dialogInterface, i) ->
NativeLibrary.UnPauseEmulation()) {
.setOnCancelListener(dialogInterface -> }).setOnDismissListener(dialogInterface ->
NativeLibrary.UnPauseEmulation()) NativeLibrary.UnPauseEmulation())
.create() .create()
.show(); .show();
} }
@ -306,66 +303,6 @@ public final class EmulationActivity extends AppCompatActivity {
return true; return true;
} }
private void DisplaySavestateWarning() {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CitraApplication.getAppContext());
if (preferences.getBoolean("savestateWarningShown", false)) {
return;
}
LayoutInflater inflater = mEmulationFragment.requireActivity().getLayoutInflater();
View view = inflater.inflate(R.layout.dialog_checkbox, null);
CheckBox checkBox = view.findViewById(R.id.checkBox);
new AlertDialog.Builder(this)
.setTitle(R.string.savestate_warning_title)
.setMessage(R.string.savestate_warning_message)
.setView(view)
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
preferences.edit().putBoolean("savestateWarningShown", checkBox.isChecked()).apply();
})
.show();
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
final NativeLibrary.SavestateInfo[] savestates = NativeLibrary.GetSavestateInfo();
if (savestates == null) {
menu.findItem(R.id.menu_emulation_save_state).setVisible(false);
menu.findItem(R.id.menu_emulation_load_state).setVisible(false);
return true;
}
menu.findItem(R.id.menu_emulation_save_state).setVisible(true);
menu.findItem(R.id.menu_emulation_load_state).setVisible(true);
final SubMenu saveStateMenu = menu.findItem(R.id.menu_emulation_save_state).getSubMenu();
final SubMenu loadStateMenu = menu.findItem(R.id.menu_emulation_load_state).getSubMenu();
saveStateMenu.clear();
loadStateMenu.clear();
// Update savestates information
for (int i = 0; i < NativeLibrary.SAVESTATE_SLOT_COUNT; ++i) {
final int slot = i + 1;
final String text = getString(R.string.emulation_empty_state_slot, slot);
saveStateMenu.add(text).setEnabled(true).setOnMenuItemClickListener((item) -> {
DisplaySavestateWarning();
NativeLibrary.SaveState(slot);
return true;
});
loadStateMenu.add(text).setEnabled(false).setOnMenuItemClickListener((item) -> {
NativeLibrary.LoadState(slot);
return true;
});
}
for (final NativeLibrary.SavestateInfo info : savestates) {
final String text = getString(R.string.emulation_occupied_state_slot, info.slot, info.time);
saveStateMenu.getItem(info.slot - 1).setTitle(text);
loadStateMenu.getItem(info.slot - 1).setTitle(text).setEnabled(true);
}
return true;
}
@SuppressWarnings("WrongConstant") @SuppressWarnings("WrongConstant")
@Override @Override
public boolean onOptionsItemSelected(MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {

View File

@ -1,139 +0,0 @@
// Copyright 2021 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
package org.citra.citra_emu.disk_shader_cache;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import org.citra.citra_emu.NativeLibrary;
import org.citra.citra_emu.R;
import org.citra.citra_emu.activities.EmulationActivity;
import org.citra.citra_emu.utils.Log;
import java.util.Objects;
public class DiskShaderCacheProgress {
// Equivalent to VideoCore::LoadCallbackStage
public enum LoadCallbackStage {
Prepare,
Decompile,
Build,
Complete,
}
private static final Object finishLock = new Object();
private static ProgressDialogFragment fragment;
public static class ProgressDialogFragment extends DialogFragment {
ProgressBar progressBar;
TextView progressText;
AlertDialog dialog;
static ProgressDialogFragment newInstance(String title, String message) {
ProgressDialogFragment frag = new ProgressDialogFragment();
Bundle args = new Bundle();
args.putString("title", title);
args.putString("message", message);
frag.setArguments(args);
return frag;
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final Activity emulationActivity = Objects.requireNonNull(getActivity());
final String title = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("title"));
final String message = Objects.requireNonNull(Objects.requireNonNull(getArguments()).getString("message"));
LayoutInflater inflater = LayoutInflater.from(emulationActivity);
View view = inflater.inflate(R.layout.dialog_progress_bar, null);
progressBar = view.findViewById(R.id.progress_bar);
progressText = view.findViewById(R.id.progress_text);
progressText.setText("");
setCancelable(false);
setRetainInstance(true);
AlertDialog.Builder builder = new AlertDialog.Builder(emulationActivity);
builder.setTitle(title);
builder.setMessage(message);
builder.setView(view);
builder.setNegativeButton(android.R.string.cancel, null);
dialog = builder.create();
dialog.create();
dialog.getButton(DialogInterface.BUTTON_NEGATIVE).setOnClickListener((v) -> emulationActivity.onBackPressed());
synchronized (finishLock) {
finishLock.notifyAll();
}
return dialog;
}
private void onUpdateProgress(String msg, int progress, int max) {
Objects.requireNonNull(getActivity()).runOnUiThread(() -> {
progressBar.setProgress(progress);
progressBar.setMax(max);
progressText.setText(String.format("%d/%d", progress, max));
dialog.setMessage(msg);
});
}
}
private static void prepareDialog() {
NativeLibrary.sEmulationActivity.get().runOnUiThread(() -> {
final EmulationActivity emulationActivity = NativeLibrary.sEmulationActivity.get();
fragment = ProgressDialogFragment.newInstance(emulationActivity.getString(R.string.loading), emulationActivity.getString(R.string.preparing_shaders));
fragment.show(emulationActivity.getSupportFragmentManager(), "diskShaders");
});
synchronized (finishLock) {
try {
finishLock.wait();
} catch (Exception ignored) {
}
}
}
public static void loadProgress(LoadCallbackStage stage, int progress, int max) {
final EmulationActivity emulationActivity = NativeLibrary.sEmulationActivity.get();
if (emulationActivity == null) {
Log.error("[DiskShaderCacheProgress] EmulationActivity not present");
return;
}
switch (stage) {
case Prepare:
prepareDialog();
break;
case Decompile:
fragment.onUpdateProgress(emulationActivity.getString(R.string.preparing_shaders), progress, max);
break;
case Build:
fragment.onUpdateProgress(emulationActivity.getString(R.string.building_shaders), progress, max);
break;
case Complete:
// Workaround for when dialog is dismissed when the app is in the background
fragment.dismissAllowingStateLoss();
break;
}
}
}

View File

@ -97,11 +97,13 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
} }
@Override @Override
public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) { public void onBackPressed() {
if (!addToStack && getFragment() != null) { mPresenter.onBackPressed();
return; }
}
@Override
public void showSettingsFragment(String menuTag, boolean addToStack, String gameID) {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
if (addToStack) { if (addToStack) {
@ -114,6 +116,7 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
} }
transaction.addToBackStack(null); transaction.addToBackStack(null);
mPresenter.addToStack();
} }
transaction.replace(R.id.frame_content, SettingsFragment.newInstance(menuTag, gameID), FRAGMENT_TAG); transaction.replace(R.id.frame_content, SettingsFragment.newInstance(menuTag, gameID), FRAGMENT_TAG);
@ -204,6 +207,11 @@ public final class SettingsActivity extends AppCompatActivity implements Setting
Toast.makeText(this, message, is_long ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show(); Toast.makeText(this, message, is_long ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();
} }
@Override
public void popBackStack() {
getSupportFragmentManager().popBackStackImmediate();
}
@Override @Override
public void onSettingChanged() { public void onSettingChanged() {
mPresenter.onSettingChanged(); mPresenter.onSettingChanged();

View File

@ -22,6 +22,8 @@ public final class SettingsActivityPresenter {
private Settings mSettings = new Settings(); private Settings mSettings = new Settings();
private int mStackCount;
private boolean mShouldSave; private boolean mShouldSave;
private DirectoryStateReceiver directoryStateReceiver; private DirectoryStateReceiver directoryStateReceiver;
@ -43,6 +45,7 @@ public final class SettingsActivityPresenter {
} }
public void onStart() { public void onStart() {
this.mStackCount = 0;
prepareCitraDirectoriesIfNeeded(); prepareCitraDirectoriesIfNeeded();
} }
@ -114,6 +117,19 @@ public final class SettingsActivityPresenter {
NativeLibrary.ReloadSettings(); NativeLibrary.ReloadSettings();
} }
public void addToStack() {
mStackCount++;
}
public void onBackPressed() {
if (mStackCount > 0) {
mView.popBackStack();
mStackCount--;
} else {
mView.finish();
}
}
public void onSettingChanged() { public void onSettingChanged() {
mShouldSave = true; mShouldSave = true;
} }

View File

@ -55,6 +55,11 @@ public interface SettingsActivityView {
*/ */
void showToastMessage(String message, boolean is_long); void showToastMessage(String message, boolean is_long);
/**
* Show the previous fragment.
*/
void popBackStack();
/** /**
* End the activity. * End the activity.
*/ */

View File

@ -357,7 +357,6 @@ public final class SettingsFragmentPresenter {
Setting shadersAccurateMul = rendererSection.getSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL); Setting shadersAccurateMul = rendererSection.getSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL);
Setting render3dMode = rendererSection.getSetting(SettingsFile.KEY_RENDER_3D); Setting render3dMode = rendererSection.getSetting(SettingsFile.KEY_RENDER_3D);
Setting factor3d = rendererSection.getSetting(SettingsFile.KEY_FACTOR_3D); Setting factor3d = rendererSection.getSetting(SettingsFile.KEY_FACTOR_3D);
Setting useDiskShaderCache = rendererSection.getSetting(SettingsFile.KEY_USE_DISK_SHADER_CACHE);
SettingSection layoutSection = mSettings.getSection(Settings.SECTION_LAYOUT); SettingSection layoutSection = mSettings.getSection(Settings.SECTION_LAYOUT);
Setting cardboardScreenSize = layoutSection.getSetting(SettingsFile.KEY_CARDBOARD_SCREEN_SIZE); Setting cardboardScreenSize = layoutSection.getSetting(SettingsFile.KEY_CARDBOARD_SCREEN_SIZE);
@ -369,7 +368,6 @@ public final class SettingsFragmentPresenter {
sl.add(new CheckBoxSetting(SettingsFile.KEY_FILTER_MODE, Settings.SECTION_RENDERER, R.string.linear_filtering, R.string.linear_filtering_description, true, filterMode)); sl.add(new CheckBoxSetting(SettingsFile.KEY_FILTER_MODE, Settings.SECTION_RENDERER, R.string.linear_filtering, R.string.linear_filtering_description, true, filterMode));
sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_ASYNCHRONOUS_GPU_EMULATION, Settings.SECTION_RENDERER, R.string.asynchronous_gpu, R.string.asynchronous_gpu_description, true, useAsynchronousGpuEmulation)); sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_ASYNCHRONOUS_GPU_EMULATION, Settings.SECTION_RENDERER, R.string.asynchronous_gpu, R.string.asynchronous_gpu_description, true, useAsynchronousGpuEmulation));
sl.add(new CheckBoxSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL, Settings.SECTION_RENDERER, R.string.shaders_accurate_mul, R.string.shaders_accurate_mul_description, false, shadersAccurateMul)); sl.add(new CheckBoxSetting(SettingsFile.KEY_SHADERS_ACCURATE_MUL, Settings.SECTION_RENDERER, R.string.shaders_accurate_mul, R.string.shaders_accurate_mul_description, false, shadersAccurateMul));
sl.add(new CheckBoxSetting(SettingsFile.KEY_USE_DISK_SHADER_CACHE, Settings.SECTION_RENDERER, R.string.use_disk_shader_cache, R.string.use_disk_shader_cache_description, true, useDiskShaderCache));
sl.add(new HeaderSetting(null, null, R.string.stereoscopy, 0)); sl.add(new HeaderSetting(null, null, R.string.stereoscopy, 0));
sl.add(new SingleChoiceSetting(SettingsFile.KEY_RENDER_3D, Settings.SECTION_RENDERER, R.string.render3d, 0, R.array.render3dModes, R.array.render3dValues, 0, render3dMode)); sl.add(new SingleChoiceSetting(SettingsFile.KEY_RENDER_3D, Settings.SECTION_RENDERER, R.string.render3d, 0, R.array.render3dModes, R.array.render3dValues, 0, render3dMode));

View File

@ -43,7 +43,6 @@ public final class SettingsFile {
public static final String KEY_HW_SHADER = "use_hw_shader"; public static final String KEY_HW_SHADER = "use_hw_shader";
public static final String KEY_SHADERS_ACCURATE_MUL = "shaders_accurate_mul"; public static final String KEY_SHADERS_ACCURATE_MUL = "shaders_accurate_mul";
public static final String KEY_USE_SHADER_JIT = "use_shader_jit"; public static final String KEY_USE_SHADER_JIT = "use_shader_jit";
public static final String KEY_USE_DISK_SHADER_CACHE = "use_disk_shader_cache";
public static final String KEY_USE_VSYNC = "use_vsync_new"; public static final String KEY_USE_VSYNC = "use_vsync_new";
public static final String KEY_RESOLUTION_FACTOR = "resolution_factor"; public static final String KEY_RESOLUTION_FACTOR = "resolution_factor";
public static final String KEY_FRAME_LIMIT_ENABLED = "use_frame_limit"; public static final String KEY_FRAME_LIMIT_ENABLED = "use_frame_limit";

View File

@ -11,7 +11,6 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/frontend/camera/factory.h" #include "core/frontend/camera/factory.h"
#include "core/frontend/camera/interface.h" #include "core/frontend/camera/interface.h"
#include "core/hle/service/cam/cam.h"
namespace Camera::NDK { namespace Camera::NDK {

View File

@ -11,7 +11,6 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/frontend/camera/factory.h" #include "core/frontend/camera/factory.h"
#include "core/frontend/camera/interface.h" #include "core/frontend/camera/interface.h"
#include "core/hle/service/cam/cam.h"
#include "jni/id_cache.h" #include "jni/id_cache.h"
namespace Camera::StillImage { namespace Camera::StillImage {

Some files were not shown because too many files have changed in this diff Show More