Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - littleguy

Pages: 1 2 [3]
31
General Discussion / Updating the menu system source
« on: October 02, 2012, 02:11:44 PM »
Looks like a lot of work has gone into updating the menu/preferences UI, and it looks really nice. After looking at it for a few hours, I started wondering if we can simplify the implementation even further, to make it a bit easier to maintain.

For example, the Android settings reference suggests that we can define the layout of the entire menu tree in a single XML file, and handle the spawning of activities (e.g. key listener, file dialogs) without so many boilerplate java classes.

I don't know all the nuances of the design decisions that went into the current implementation, and there may already be plans to do some of these, so please correct me if I'm missing something.  I'm happy to take a crack at an overhaul if you guys don't have the time.



32
Ok, as a total Android noob I took a few wrong turns getting the source to build on Windows.  Hope some people find this helpful.  Keep in mind these instructions were made on 9/26/2012 and may get out of date eventually.

  • Download and install the Android SDK.
  • After installation, run (install location)\SDK Manager.exe as administrator and install platform-tools, usb driver, etc. just as described on Android dev website.
  • Run (install location)\AVD Manager.exe if you want to set up any device emulators, again following Android website.
  • Download the Android NDK and unzip it to a path with no spaces in the name (I used C:\android-ndk-r8b\).  Don't worry about GNU make or any of the other stuff the Android website discusses; we'll take care of all that next.
  • Download and install Cygwin.  Just leave the default settings for all the install prompts (next, next, next, ..., finish) and don't worry about installing extra packages.  Be sure it installs to a path with no spaces in the name (I used C:\cygwin\).
  • In Windows 7, open Control Panel->System and Security->System and click on Advanced system settings on the left column.  If you're using another Windows version, try to find the location where path variables are defined.
  • In the window that pops up, click the Advanced tab, then the Environment Variables... button at the bottom.
  • Go to System variables, select "Path", click the Edit... button, then append "C:\cygwin;C:\cygwin\bin;" (without quotes) to the string. Then press OK, OK.
  • Install Eclipse by unzipping it somewhere, e.g. C:\Program Files (x86)\.  I couldn't get the 64-bit version to run on my Win7-64 machine, but the 32-bit version was fine.
  • Install the ADT Plugin for Eclipse, including the Native Android Development Tools component.  Don't worry about installing Sequoyah like it says in the Mupen64Plus-ae readme.
  • In Eclipse, go to Window->Preferences->Android and be sure the path to the Android SDK is correct.  Then go to the NDK subitem and be sure the path to the NDK is correct as well.
  • Download or Git->Clone the Mupen64Plus-AE source code to your machine, again to a path no spaces in the name.
  • In Eclipse, go to File->Import... and select Existing Android Code Into Workspace.  Leave the default settings and finish.  You should not see any red messages in the console.
  • Right-click the mupen64plus-ae project and go to the Android Tools submenu.  Click the Fix Project Properties item.
  • In the same context menu, you should not see an option to add native library support.  If you do, you might have missed a step above.
  • In Eclipse, click Project->Clean... and just select the mupen64plus-ae project and continue.  Eclipse will now re-build the native portion of the project, which will take 5 or 10 minutes the first time.  You shouldn't see any error messages.
  • If you've made it this far, you're on the home stretch.  Plug in your phone/tablet or start an emulator, then in Eclipse click Run->Run.  Select "Android Application" if it prompts you.  Eclipse will build the remainder of the project and upload it to your device/emulator, which might take up to a minute the first time.
  • On your device/emulator try opening a game ROM to be sure the native library built correctly. If you have any run-time problems, go back to Eclipse and click Run->Debug and watch the LogCat for diagnostic messages.

And I think that's it!  Let me know if I missed a step... I'm going off memory.

33
Awesome app!  I'm actually building my own Arduino-based HID joystick & case for my Nexus 7 to enhance the gaming experience further.

I'd love to have native HID analog support for this app (Android 3+), but I know your attention is (understandably) diverted from this project for now.  I'd like to try adding the functionality myself, so I downloaded the source code from git.  However I was quickly overwhelmed with the amount of code!  Would you mind pointing me to the particular source files/classes pertinent to adding native HID/analog support, so I can give it a try?  If you have any cursory thoughts on the matter I'm all ears as well.  Of course if I'm successful, I will be happily obliged to contribute my mods back into the next release.

As an aside,  I am using USB/BT Joystick Center app with a Logitech gamepad, everything works fine.  Unfortunately my custom HID joystick (which is plug-n-play in windows) isn't working with Joystick Center and I've been in contact with that app's developer.  So between that app and this, I hope to have a solution to  Mupen64Plus + analog controls +my controller.


Pages: 1 2 [3]