Commit Graph

325 Commits

Author SHA1 Message Date
Ryan Houdek bab91494d5 Merge branch 'master' into android-core-control 2013-09-23 00:47:57 -05:00
Ryan Houdek 1da6469c62 [Android] Use new 4.0 icon. 2013-09-23 00:25:34 -05:00
Lioncash af7ed820f5 [Android] Add a JP version of the string for FSAA. Also correct the English string too. 2013-09-22 19:16:32 -04:00
Ryan Houdek bdae5d1027 [Android] Fix typo, FSAA stands for full scene antialiasing. 2013-09-22 11:59:10 -05:00
Ryan Houdek 6340ad68be Merge branch 'GLES3-FSAA' 2013-09-22 10:00:51 -05:00
Ryan Houdek 81effb8099 [Android] Add in FSAA option. 2013-09-22 09:25:38 -05:00
Pierre Bourdon 1f95a294cd Add the new 'Clean' themes from MaJoR and default to Clean by changing the name of the config key (yes, hack) 2013-09-22 16:00:56 +02:00
Lioncash 49fff7979b [Android] Make the FolderBrowser extend a ListFragment instead of a regular fragment. Lets us get rid of the need for an AdapterView.OnItemClickListener when handling list item clicks. Simplifies the implementation of the FolderBrowser a tiny bit. 2013-09-18 22:17:23 -04:00
Ryan Houdek 24a44ecfb8 [ANDROID] Add two new DriverDetails bugs for Adreno. V45 of the driver has broken shader compilation with UBOs in the shaders, this is most likely fixed with V53 found in the Nexus 5. Add a bug for issue surrounding on screentext and doing a glClear after swap causes screen swizzling and zero frames rendered respectively. On the Java side, pass in the dimensions of the screen swapped since there is an issue with Adreno where it rotates the output 90 degrees for some reason. Disable the GLSL shader cache on Android for now due to the inability to cleanly exit the emulator, this tends to cause the cache to get corrupted. All this together fixes rendering with Adreno 3xx GPUs with driver version v14 and above. In particular my Galaxy S4 still resets with this without the root commands, but my HTC Droid DNA and LG G2 is fine. This must be due to particular 'enhancements' that the Samsung kernel has over the other ones. The speed on Adreno has yet to be optimized, so it will most likely be slow still. Faster than the software rasterizer in any case. The ARMJIT is still broken in at this point, so not much fun can be had. 2013-09-18 02:37:10 -05:00
Lioncash db7f8697ba [Android] Use a simpler "startActivity()" call in DolphinEmulator.java. Turns out the other one isn't 4.0 compatible, but actually only 4.1 and up. Also, in this case, we really don't actually care about the saved instance state bundle. 2013-09-18 01:57:01 -04:00
Lioncash 988544389a [Android] Slightly change the layout of the AboutFragment. Looks more like an actual list view now. 2013-09-16 22:04:59 -04:00
Lioncash b4883e2ada [Android] Make the AboutFragment extend the ListFragment, since this is basically what this fragment acts as. Much more descriptive than simply extending Fragment.
Also made the list non-clickable, since it isn't supposed to be interacted with.
2013-09-16 21:04:58 -04:00
Lioncash 449cd3b267 [Android] No need to use startActivityForResult in DolphinEmulator.java any more. Just some leftover stuff from the big refactor. 2013-09-15 22:11:17 -04:00
Lioncash 5a0f0b908e [Android] Fix the name of the parameters in some unused interface methods.
There are some interface methods that are simply stubbed for the time being. It would be better to give the parameters better names despite not being used.
2013-09-15 14:34:30 -04:00
Pierre Bourdon c3eec379df Move global User/Wii to Sys/Wii 2013-09-14 06:08:30 +02:00
Ryan Houdek 751fae4965 [Android] Make sure the default config file has fastmem disabled. 2013-09-13 21:17:40 -05:00
Lioncash 7a15159c34 [Android] Explicitly set the defaults for the CPU settings. 2013-09-13 00:29:59 -04:00
Lioncash 0490d7d59c [Android] JP strings for the Fastmem option. 2013-09-13 00:24:06 -04:00
Ryan Houdek ba05db7828 [Android] Add a fastmem option to the cpu options, default disabled. 2013-09-12 23:08:00 -05:00
lioncash 84db868187 [Android] Android uppercases the name of the tabs in the settings by default. So we don't have to call ".toUpperCase" in the string returns in getPageTitle(). 2013-09-10 11:21:13 -04:00
lioncash 8ceb72612a [Android] Kick the targetSdkVersion in the AndroidManifest XML file to 18. Since this app basically works on 4.x.x, we don't need to make compatibility modes kick in for anything above 4.0.0.
Also very minor cleanup to the XML.
2013-09-10 09:29:05 -04:00
lioncash ce5f80b151 [Android] Give the exceptions in compareTo implementations in GameListItem and FolderBrowserItem some messages. If the exceptions ever actually get thrown, at least you're given a reason as to why the exception was thrown now. Also changed the exception type to NullPointerException. IllegalArgumentException is intended to be used for validating the parameters in constructors/methods. 2013-09-10 08:32:11 -04:00
Lioncash a3ef35a1bf [Android] Fix a bug where the video backend would not load correctly. 2013-09-09 22:38:09 -04:00
Lioncash f382a53500 [Android] Organize the list of allowed file extensions for the folder browser and game list alphabetically.
Keeps things nice and sorted.
2013-09-08 17:52:26 -04:00
Lioncash c306dafe44 [Android] Simplify some checks within the the folder browser in regards to checking if a file is hidden or not. Also potentially fixed the case where items in the game list would not remain saved to the config. 2013-09-08 16:45:37 -04:00
Lioncash f753b9ae97 [Android] Show the full text for save and load states if there's room on the screen. If not, let it overflow into a context menu. 2013-09-07 19:19:28 -04:00
Lioncash cc054b9da3 [Android] Make the MotionAlertDialog private. This isn't needed to be protected anymore. The only reason it was protected was for when the input settings were coupled as all hell to the GameListActivity (lol). Also documented the interface method within it. 2013-09-07 18:51:15 -04:00
Lioncash 86d10ec19e [Android] Fix the input binding string.
Forgot a period at the end. Thanks for pointing that out pauldachz
2013-09-07 06:19:24 -04:00
Lioncash 10eb9f09b4 [Android] Change a check for an empty path from !path.equals("") to !path.isEmpty() in GameListItem.
Also simplify the logging exception tag in the constructor.
2013-09-04 08:02:32 -04:00
Lioncash b94a462fca [Android] Remove the compareTo implementation from SideMenuItem. We don't perform any operations that require it. 2013-09-04 07:43:56 -04:00
Lioncash 38304a7e42 [Android] Simplify the JP settings labels. 2013-09-04 07:36:28 -04:00
Lioncash 48cda9d26f [Android] Display the name of the control that is being bound in the input settings. Makes the binding description more informative. 2013-09-04 07:32:28 -04:00
Lioncash a83d4e7226 [Android] Correct a typo for the load state menu root in the menu overlay XML. Should be "loadStateRoot", not "loadtateRoot" 2013-09-04 07:19:02 -04:00
Lioncash a7c2b27a6a [Android] Remove unused strings from the resource XML files. 2013-09-04 07:09:29 -04:00
Lioncash bdc04f9119 [Android] Change the exception logging in NativeLibrary to be an error instead of a warning.
Technically not having the required library should be regarded as an error, since the app won't even load without it.

Also changed the logging tag in FolderBrowser.
2013-09-04 06:46:11 -04:00
Lioncash 70cfe96492 [Android] Fix an accidental call to the wrong method in the superclass of EmulationActivity. Should have been returning "super.onMenuItemSelected(itemId, item)" instead of "super.onOptionsItemSelected(item)". 2013-09-03 17:25:45 -04:00
Lioncash 4f72671d32 [Android] Change the documentation of the FolderBrowser class. We don't show invalid items anymore. 2013-09-03 07:05:02 -04:00
Lioncash e198e201e4 [Android] Fix the video settings from crashing the app. Was broke in the commit "Removal of my terrible idea"
https://code.google.com/p/dolphin-emu/source/detail?r=2897619ddbd3e3aae8427fc503647c65e770d466

Didn't comment out the line for that preference in the XML. This is disabled for now until the UI overlay for the buttons are implemented directly into the Java front-end.
2013-09-02 11:00:22 -04:00
Ryan Houdek 2897619ddb Removal of my terrible idea. 2013-09-02 05:31:48 -05:00
Lioncash d41eb76378 [Android] Fix the last commit. On-screen control drawing wouldn't re-enable upon flipping video backends. 2013-09-01 20:36:47 -04:00
Lioncash acf3bd8697 [Android] On-screen controls work for Software Renderer, but not the OpenGL ES 3 video backend yet. Enabled it for Software Rendering and disabled it for Open GL ES 3. 2013-09-01 20:31:45 -04:00
Lioncash d84312c799 Merge branch 'master' of https://code.google.com/p/dolphin-emu into android-core-control 2013-09-01 15:24:29 -04:00
Lioncash c092c65d4a [Android] Disable most video preferences if Software Rendering is chosen. Since the software renderer and other renderers have little in common, it doesn't make sense to keep many of the video preferences enabled. 2013-09-01 15:20:15 -04:00
Lioncash 440ae412b0 [Android] Add the option to show the on-screen FPS counter. 2013-09-01 03:07:16 -04:00
Lioncash 51c814f34e [Android] Removed the unnecessary MainActivity generics declaration in the DolphinEmulator class. It's unused (and likely won't be used). 2013-08-30 15:47:04 -04:00
Lioncash c633c2bb13 [Android] Some various cleanups. Also make some class variables final.
Localize some variables as well, and clean up an import.
2013-08-30 15:31:25 -04:00
Lioncash fae0c860f6 [Android] Woops forgot a JP TL of a UI string. 2013-08-29 22:56:40 -04:00
Lioncash cf96bfc2be [Android] Add a button in the emulation view that allows a person to exit emulation and go back to the game list.
However, this does not work correctly yet. It will stop correctly. But the SurfaceView will not render the next game selected.
2013-08-29 22:52:09 -04:00
Lioncash 90918cdb84 [Android] Remove garbage loggers for when I was debugging why the overlay buttons wouldn't work. 2013-08-29 21:09:38 -04:00
Lioncash dac9659c58 [Android] Preliminary save-state support. Have the UI set up. Crashes with SIGABRT however. 2013-08-29 21:07:17 -04:00
Lioncash b5d5296250 [Android] Accidentally enabled screen rotation in the emulator window. Disabled it. 2013-08-29 19:09:56 -04:00
Ryan Houdek 96394da1c2 [Android] Let NativeLibrary handle initial folder structure creation. 2013-08-29 18:07:32 -05:00
Ryan Houdek 957c263367 [Android] Add save state native functions. 2013-08-29 17:47:50 -05:00
Ryan Houdek 1dcede4d56 [Android] Stop the play store from overwriting buildbot builds. 2013-08-29 22:28:23 +00:00
Lioncash 5a749cc7ca [Android] The back button now toggles the visibility of the action bar in the emulation window. This can be used in the future to implement the overlay for save states and other things. 2013-08-29 18:26:45 -04:00
Lioncash aeec249626 [Android] Decouple the emulation processes from the Main activity. Moved them into their own activity called EmulationActivity. 2013-08-29 17:21:17 -04:00
Lioncash 335839b27f [Android] Move the instantiation of the NativeGLSurfaceView into a layout file. This will allow the addition of other components in the future, such as overlays, etc. 2013-08-29 13:13:44 -04:00
Lioncash 01764fef67 [Android] Forgot to make the AboutFragmentAdapter class 'final' 2013-08-29 12:45:40 -04:00
Lioncash 8fd2c32ba6 [Android] Decouple the About fragment from the FolderBrowserAdapter. Now it uses its own independent adapter (I have no idea why this wasn't done in the first place). 2013-08-29 12:40:35 -04:00
Lioncash 93ed4adb02 [Android] Use the same layout for the game list and the folder browser. Since the UI layouts are exactly the same. 2013-08-29 12:16:29 -04:00
Lioncash 64b83a18b2 [Android] Simplify the line divider for the folder browser and game list. Turns out someone disabled it in the list view initially. No more custom implementation now. 2013-08-29 12:06:31 -04:00
Lioncash c5a886100c [Android] Some minor formatting styling.
Remove unnecessary this statements.
2013-08-28 20:31:37 -04:00
Lioncash ea671d639c [Android] Simplify the onItemClick listener for the GameListAdapter in GameListFragment. There is no need to evaluate whether or not an item is a folder, since folders cannot be added in the first place. Probably some leftover code I forgot to remove. 2013-08-28 18:23:32 -04:00
lioncash d4840565a9 [Android] Fix the position of a logcat logging statement. If, for whatever reason, the event parameter is null, then the previous placement would have caused an exception. 2013-08-28 08:21:09 -04:00
lioncash 8ca3ed13de [Android] Clean up AboutFragment's onAttach method. 2013-08-28 08:15:00 -04:00
Matthew Parlane 2a68b65cda Merge branch 'master' into wii-network 2013-08-28 00:57:37 +12:00
Lioncash 4a863c88b4 [Android] Simplify onAttach for CPUSettingsFragment and VideoSettingsFragment 2013-08-27 04:06:18 -04:00
Lioncash 76f20cca59 [Android] Remove the documentation of a parameter in GameListItem that was removed a while ago. 2013-08-27 04:01:20 -04:00
Ryan Houdek d83dffe442 [Android] Add wad file support. 2013-08-26 12:19:47 -05:00
Lioncash 670b028492 [Android] Remove the explicit key event listener from InputConfigFragment. The AlertDialog class has a key listener built into it.
Also documented the methods/interfaces in MotionAlertDialog.
2013-08-26 13:19:06 -04:00
Lioncash e12c66b6cf [Android] Only dismiss the input dialog when an input is registered. Before it would dismiss upon the first event. Fixes a bug where control sticks wouldn't register because of the AlertDialog closing immediately after the "if (firstEvent)" branch. 2013-08-26 12:56:35 -04:00
Lioncash ba274368f8 [Android] Make the dialog variable in InputConfigFragment a local variable in onPreferenceTreeClick. With the new input UI, this doesn't need to be accessible to other classes.
Also change the documentation of the custom dialog class.
2013-08-26 11:58:51 -04:00
Lioncash 08153387c5 [Android] Greatly simplify the input handling for the button mapping settings. Now input handling is directly in the fragment. 2013-08-26 08:57:52 -04:00
Lioncash 07ea771012 [Android] Finish documenting the native functions in NativeLibrary.java. 2013-08-26 08:06:28 -04:00
Lioncash db355b21d2 [Android] My bad, somehow the Java file in the previous commit got encoded with UTF8+BOM. 2013-08-25 23:57:53 -04:00
Lioncash 9dfb6dfd7f [Android] Fixed a typo in the event callback system documentation. 2013-08-25 23:49:51 -04:00
Lioncash 786f09b1fa [Android] Document the event callback system used in the Settings menu in large detail. 2013-08-25 23:47:51 -04:00
Matthew Parlane 15f8603d1f Merge branch 'master' into wii-network
Conflicts:
	Source/Core/Common/Src/CommonPaths.h
	Source/Core/Common/Src/FileUtil.cpp
2013-08-26 00:50:57 +00:00
Lioncash 28008814a7 [Android] Apparently I also forgot to commit the input menu layout. 2013-08-25 03:16:05 -04:00
Lioncash 6c0c460320 [Android] Woops forgot to commit the new resource strings. 2013-08-25 03:13:00 -04:00
Lioncash 709ab1feb5 [Android] Initial implementation of the new input UI.
Testing may be further required. But it should work for the most part.
2013-08-25 03:10:32 -04:00
Lioncash 2017ab9323 Revert "[Android] First french translation. "
This reverts commit d2481aa477.
2013-08-24 09:50:02 -04:00
Lioncash 31ea87d705 Revert "[Android] Added 2nd file for French translation. "
This breaks the Android UI. 'translatable="false"' is there for a reason."
This reverts commit 5d9700a303.
2013-08-24 09:43:21 -04:00
pascal.jouy 5d9700a303 [Android] Added 2nd file for French translation.
(Sorry, I didn't find how to upload 2 files at the same time in Google Code)
2013-08-24 13:37:42 +00:00
pascal.jouy d2481aa477 [Android] First french translation.
Can't try it as I don't have any Android device. Any feedback appreciated.
If misplaced, please fix it.
2013-08-24 13:36:18 +00:00
Lioncash a90e82d2c0 [Android] Invalidate the options menu upon switching fragments. This hides the 'clear game list' option faster when switching fragment. Also fixes a rare bug where the option might not even redraw when returning to the game list. 2013-08-24 09:19:40 -04:00
Lioncash 528a733359 [Android] Don't create a new GCMPath entry in the Dolphin config if it another existing GCMPath entry already has the same directory path.
Also, fix a 'bug' with the clear all items function. Make sure we set GCMPathes to 0, so that GCMPath entries start adding at GCMPath0 again.

This change also allows me to remove the duplicate checking code from GameListFragment, since the items in the game list are loaded based on the GCMEntries in the Dolphin config.
2013-08-24 09:12:17 -04:00
Lioncash 857ce47de2 [Android] Add the license header to Java files that were missing it. 2013-08-24 08:23:23 -04:00
Matthew Parlane 5548e77438 Merge branch 'master' into wii-network 2013-08-24 23:56:31 +12:00
Matthew Parlane 6907a32653 Fix android, part 3 of 3. >:) 2013-08-24 23:49:50 +12:00
Lioncash 66c50ebf19 [Android] Better description for the dual core option. 2013-08-24 07:37:28 -04:00
Lioncash 6df36ec687 [Android] Forgot to commit the menu layout XML when I implemented the option to clear the game list. 2013-08-23 16:17:02 -04:00
Lioncash 7f61c31f85 [Android] Fix some redundancy in the category names for the settings menu. In a menu named "Settings" (which is shown in the top left) we have the categories, "CPU Settings" and "Video Settings" - but the fact they are settings pages is already established at this point so it's redundant. Just made them "CPU" and "Video" instead.
Also changed the description for dual-core

They now look like this: http://i.imgur.com/qieaKmL.png
2013-08-23 16:10:55 -04:00
Lioncash 1469342f83 [Android] Add an option to clear the game list. 2013-08-23 11:17:24 -04:00
Lioncash c2aef25f4c [Android] Since we don't show invalid filetypes in the file browser anymore, there's no need to check if a file is valid or not since they're all valid now. 2013-08-23 10:26:15 -04:00
Lioncash 70dab0d839 [Android] Document most of the native functions in NativeLibrary.java. 2013-08-23 10:15:36 -04:00
Lioncash 654b0dbfa8 [Android] Fix the removal of duplicate items from the gamelist.
This should have initially been a nested loop since it now guarantees every item in the list is checked.

Also, removed some unused code and documented some things.
2013-08-23 09:50:00 -04:00
Lioncash d9485cbf23 [Android] Only show valid files in the file browser. 2013-08-23 00:18:01 -04:00
Lioncash 41c25d0c90 [Android] General cleanup. Add more documentation.
Remove some accidental changes that slipped through. Don't want to have input settings in the settings menu just yet.
2013-08-22 08:18:56 -04:00
Lioncash 951bbcd6ce [Android] Change the .settings file to target Java 1.6 instead of 1.5. 2013-08-22 07:39:11 -04:00
Lioncash 779f02d9a5 [Android] Turns out the sidebar XML could also be simplified. 2013-08-22 07:02:30 -04:00
Lioncash 0c5f3953dd [Android] Simplify the XML layout for the about menu. Remove unused strings. 2013-08-22 06:58:19 -04:00
Lioncash c2bab4edd4 [Android] Remove fragments from the Android Manifest XML. These shouldn't be defined here (nor do they need to. They're fragments, not activities). 2013-08-22 03:53:39 -04:00
Lioncash 7c99b0650b [Android] Format all Java files to be consistent. 2013-08-22 03:43:07 -04:00
Lioncash f09cafb2be [Android] Make the previous commit parlane approved in terms of boolean conditions. 2013-08-22 02:57:31 -04:00
Lioncash 988c168c2d [Android] Fix a bug in FolderBrowser.java which was causing an incomplete directory structure to show. 2013-08-22 02:52:05 -04:00
Lioncash 85c78759c7 [Android] Make two class variables in InputConfigFragment private. If left the way they were, they could be accessed by other classes in its package, which is not intended. 2013-08-21 21:27:32 -04:00
Lioncash 97bfa6300d Remove unused code from InputConfigFragment. This was for when the option to draw onscreen controls was in this menu instead of video preferences. 2013-08-21 21:10:23 -04:00
Lioncash ca23318089 [Android] Fixed a bug where the config files might not load correctly upon launch. If the initial files existed, it wouldn't load the configs. This fixes that.
If the files don't exist they will be copied (in the previous block) and everything will be fine.
2013-08-21 16:02:43 -04:00
Ryan Houdek 8b291b6b57 [Android] Allow users to be able to choose where they want the APK installed. 2013-08-21 14:35:31 -05:00
Ryan Houdek fbd0fba13a [Android] Fix preferences from crashing. OSD controls was supposed to be boolean. 2013-08-21 00:06:48 -05:00
Lioncash 53df78d372 [Android] Missed a string for the Japanese translation. 2013-08-20 20:48:43 -04:00
Lioncash e52c2ac337 [Android] Migrate the "Draw Onscreen Controls" preference to the video settings. 2013-08-20 20:28:48 -04:00
Lioncash 9170c9b360 [Android] Remove unnecessary string messages from CPUSettingsFragment and VideoSettingsFragment. 2013-08-20 19:57:00 -04:00
Lioncash 00996c8d38 [Android] Implement a ViewPager for the settings. Also, move classes into appropriate packages to make things cleaner. 2013-08-20 19:39:00 -04:00
Ryan Houdek 0521b6aa69 [Android] Hopefully fix buildbot's ant build. 2013-08-20 15:41:11 -05:00
Lioncash 8de3250550 [Android] Load all of the new settings from the ini when the app is launched.
- Also fix a typo in the ini saving method in UserPreferences. Accidentally spelt the ini name wrong.
- Also include the relocated XML preferences. I meant to push this with the previous commit.
2013-08-20 15:35:16 -04:00
Lioncash 3fdfd75832 [Android] Add most of the Dolphin video/gfx settings to the settings menu. 2013-08-20 14:33:30 -04:00
Lioncash dd35156717 [Android] Forgot to document the new parameter used in SaveConfigToDolphinIni() in the last change. Fixed that. 2013-08-19 22:37:04 -04:00
Lioncash 9595457e1c [Android] Turn SaveConfigToDolphinIni() into a static method. Now saving settings to the ini config just uses one call in PrefsFragment.onDestroy(). 2013-08-19 22:34:27 -04:00
Lioncash 6dbfdce775 [Android] Remove the loading toast messages from the UI. These really don't need to be here since the things they were used for took very, very little time to load. 2013-08-19 22:09:43 -04:00
Lioncash 8dc0b38f00 [Android] Decouple Dolphin.ini config file saving from GameListActivity. It doesn't make sense to save the config AFTER control is returned from PrefsFragment to GameListActivity, since the main purpose of PrefsFragment is to handle the user settings. So, instead, we call SaveConfigToDolphinIni() in the PrefsFragment.onDestroy() method. This way, when the PrefsFragment object is being 'destroyed', it will write the settings to the ini. 2013-08-19 21:56:13 -04:00
Lioncash a87b967cde [Android] Simplify saving settings to the ini file. Since the setting names are known, there's no reason to loop through them.
This will likely be simplified further very soon.
2013-08-19 20:55:50 -04:00
Lioncash 77a5af3bcf [Android] Change the settings menu a little more. Instead of the settings being a single view with settings from all components being displayed, I have broken it into sections. This future-proofs the settings menu in the sense that it won't get cluttered before people start asking "Hey, shouldn't this be broken into sections?".
As of this commit, it is broken into CPU Settings and Video Settings.
I also simplified the code that is responsible for setting the valid CPU cores and video backends by simply making UI string arrays that get chosen, based on the platform the Android device is running on.
2013-08-19 19:10:13 -04:00
Lioncash 205ebbebbb [Android] Catch a more specific exception type (UnsatisfiedLinkError) when trying to load the main native Dolphin 'library'.
Also made the logging tag more specific.

It's generally bad to catch Exception because it's not very specific for the person reading the code. It doesn't say why that exception might have happened, it just indicates it's possible for an Exception to happen, which is quite general.
2013-08-18 18:30:13 -04:00
Lioncash 803b7ae991 [Android] Make the banners display a little larger. Now they don't look like tiny icons in the game list. 2013-08-17 22:51:35 -04:00
Ryan Houdek ba76b016da [Android] Fix Wii games. 2013-08-17 19:41:28 -05:00
Lioncash 07d729daa2 [Android] Prevent duplicate duplicate items from being in the game list at one time.
Previously it was possible for a game with the same path and name to be in the list as another. This is annoying because duplicates ae (obviously) no different from the initial item.

This prevents duplicates from entering the list.

The way this works is:

1. We get the final list of items to add to the list.

2. Loop through it using two indices, which, for this explanation I'll call [item] and [itemAfter]

We compare path name at item with index [item] and the path name at item with index [itemAfter]
To phrase this numerically comparison works like so:

for (int i = 0; i < listSize; i++)
{
    if (i+1 < listSize)
        item[i].getPath().equals(item[i+1].getPath())
}

3. For each path comparison that is true, remove item at [indexNext].
2013-08-17 14:28:50 -04:00
Lioncash a9d634086c [Android] Change the Game List items to be formatted similarly to how the folder browser is. Also ensure the 'no banner' icon scales down to the same size as the other banners. 2013-08-17 13:25:40 -04:00
Lioncash 1f6c63f1d8 [Android] Ensure that required dependencies are actually exported along with everything else when the Android version builds. Without this, the support libs will not export and cause the emulator to crash upon being executed. 2013-08-17 12:26:43 -04:00
Lioncash 88f79a14db [Android] Simplify if statement conditions for the item click listener in FolderBrowser.java.
Since FolderBrowserItems have an 'isDirectory()' method, that's all we need to care about now. There's no need to check subtitles to determine if an item is a directory anymore.
2013-08-17 11:03:02 -04:00
Lioncash 9149b30237 [Android] Shorten FolderBrowserItem's method 'isValidItem()' into 'isValid()' makes more sense and less redundancy in terms of 'item.isValidItem()' -> 'item.isValid()' 2013-08-17 10:55:13 -04:00
Lioncash 5047eeb263 [Android] FolderBrowserItem objects don't need to store a context.
Removed the requirement to pass a context in the constructors.
Also cleaned out unnecessary imports.
2013-08-17 10:50:31 -04:00
Lioncash 82e9bed20e [Android] Fix a bug where the name would display incorrectly in the game list.
Completely missed the 'this.' on the variable. My bad.
2013-08-15 20:34:05 -04:00
Lioncash 072fac4a74 [Android] Remove a redundant LinearLayout in one of the layout files. 2013-08-14 20:49:26 -04:00
Lioncash 3e6f9d22db [Android] Add a faint divider line between each folder browser item.
See here for how it looks: http://i.imgur.com/CGX9NTt.png
2013-08-14 20:43:29 -04:00
Lioncash 9c27fedd6d [Android] Remove the subtitles on all folders in the folder browser. No need to have the subtitle "Folder" when it's visibly indicated by the icon of a folder next to it.
Now it looks like this: http://i.imgur.com/CbUSqgg.png
2013-08-14 19:49:39 -04:00
Lioncash 94397a44cc [Android] General formatting clean-up.
Made some class variables final, since they should convey that they cannot be changed after the first assignment.
Made the formatting consistent between files.
2013-08-14 15:03:07 -04:00
Lioncash 6f1612d99c [Android] Fix the gamepad settings view inflation.
In some cases, it would fail to inflate correctly in the sense that it would only show the binding status and not the name of the actual control that was being binded.
2013-08-14 14:33:47 -04:00
Lioncash 39eeb37032 [Android] Correct the accessibility scope of a method and variable in InputConfigFragment.java.
Also, join a variable's declaration and assignment in the onMotionEvent() function.

If no explicit accessibility term (private, protected, public, etc) is given, then the permission level is set to something called 'package-private' which means it is set to the scope of the whole package. So technically any class could have access to this method and variable, which is likely not what we want.
2013-08-14 07:33:17 -04:00
Lioncash 0142efbb2a [Android] Add 'final' to all of the class declarations.
This prevents inheritance of the classes (will throw a compiler error if you try and extend any of the classes).
This is mainly syntactical sugar and form. Nothing major.
2013-08-14 07:17:45 -04:00
Lioncash 3cc8f7747e [Android] Main title text for the file browser items are bolded again. Must have removed it accidentally during the previous large refactor. 2013-08-13 14:32:46 -04:00
Lioncash 53bf55b1e9 [Android] Make the file browser look much more nice and user friendly to use.
This is what it now looks like: http://i.imgur.com/KOZgA1i.png

As usual, if any bugs arise from this rather large change. Please report it so I can fix it.
2013-08-13 13:05:42 -04:00
Lioncash 8fbf11a0d9 [Android] Add translatable="false" to the names of the string arrays in prefvalues.xml. 2013-08-13 12:10:42 -04:00
Lioncash a8fcd50cd7 [Android] Integer.toString isn't required in this string declaration. Concatenation handles this.
For example: "string" + 1 will just be concatenated as "string1" implicitly.
2013-08-13 10:09:42 -04:00
Lioncash debd5b42cf [Android] Clean up function SupportsGLES3 in PrefsFragment.java a little bit. 2013-08-13 09:48:18 -04:00
Lioncash 2015484c24 [Android] Some tiny cleanups in DolphinEmulator.java
- Join variable declaration and assignments in function onTouchEvent()
- Change a for-loop into a foreach loop in dispatchGenericMotionEvent(). Makes the loop body a single statement.
2013-08-13 09:23:11 -04:00
Lioncash 0916d0797c Simplify asset copying code a little bit in DolphinEmulator.java
Since the directories are already cached (with smaller variable names), use these instead so we can shorten the length of each line.
2013-08-13 09:13:46 -04:00
Lioncash e3617a55a0 [Android] Clean up the function CopyAsset in DolphinEmulator.java.
[streamtype].flush() is called when [streamtype].close() is called.

No need to null the references either after calling close(), the garbage collection will take care of it.
2013-08-13 08:58:50 -04:00
Lioncash 2d7244f6d5 [Android] Change the name of a variable in FolderBrowser.java to better reflect its purpose
Compressed file formats are not valid, so it's best to rename this to invalidExts.
2013-08-13 08:50:21 -04:00