• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 ... 53 54 55 56 57 ... 320 Next »

Wii Remote and Dolphinbar. How do you exit games?
View New Posts | View Today's Posts

Pages (2): « Previous 1 2
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Wii Remote and Dolphinbar. How do you exit games?
10-19-2016, 05:14 AM
#11
leolam Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,478
Threads: 5
Joined: Sep 2015
Yeah, it looks like only the system menu triggers that message. I haven't seen it in another case, but that can technically happen.

If you want to look into it (you don't necessarily have to know C++; I started working on Dolphin with absolutely no C++ knowledge), you'll need to figure out why the emulated software doesn't ask the STM to shut down when the last Wii remote is disconnected.

And that's the only thing that is required to make this work, because I have already made the STM stop emulation when requested to.
Website Find
Reply
11-30-2016, 07:47 AM (This post was last modified: 11-30-2016, 09:19 AM by eagle3ye.)
#12
eagle3ye Offline
Junior Member
**
Posts: 9
Threads: 2
Joined: Oct 2015
(10-18-2016, 03:20 AM)jmorriz Wrote: Someone asked me to post the Java code I'm using.  You'll need some Java knowledge to put it into your own executable program.  Here it is:




Code:
               BufferedReader in = null;
               try {
                   File file = new File(Config.DOLPHIN_LOG);
                   String line;
                   boolean sentEscape = false;
                   while (process.isAlive()) {
                       if (in == null && !file.exists()) {
                           Thread.sleep(5000);
                       } else {
                           if (in == null) {
                               in = new BufferedReader(new FileReader(file));
                           }
                           while ((line = in.readLine()) != null) {
                               if (line.endsWith("N[OSREPORT]: EXI IPL-DEV: write 0 at a1000800")) {
                                   // wii menu was selected.  tell dolphin to exit
                                   Robot robot = new Robot();
                                   robot.keyPress(KeyEvent.VK_ESCAPE);
                                   sentEscape = true;
                               }
                           }
                           if (sentEscape) {
                               for (int i = 0; i < 5; i++) {
                                   if (process.isAlive()) {
                                       Thread.sleep(1000);
                                   }
                               }
                               if (process.isAlive()) {
                                   Runtime.getRuntime().exec("taskkill.exe /F /IM Dolphin.exe");
                               }
                           }
                       }
                   }
               } catch (Exception e) {
                   e.printStackTrace();
               }
               try { if (in != null) in.close(); } catch (Exception e) {}

Oh man... This is exactly what I've been looking for... I have absolutely no knowledge of Java, but how do I create the executable and where do I put it? Do I need to launch it with Dolphin? So awesome! Please enlighten me.

EDIT: I'd even take a pm with the executable you created! :-D
Find
Reply
03-14-2017, 12:08 AM
#13
EazyCheeze1978
Unregistered
 
I apologize for the mild necropost, but this is the exact issue I am having currently. I'm reading that there's no way for a non-programmer to effect this within their setup? It's the only thing that is keeping me from potentially using the Wii games with my HTPC independent of another controller. (My front end, LaunchBox, lets me hit Back+Start on my Xbox 360 Wireless controller to send an ALT+F4 press to any program it launches, which is super handy for emulators that can use that controller, but with the Wii I have to put down the remote/nunchuk, pick up the controller and use that combo. Sort of inconvenient but serviceable. Smile )

Just wanted to put my input in and see if there was any movement on this issue. Love the emulator VERY much, as well as its unofficial offshoot Ishiiruka! Smile Keep up the amazing work!
Reply
12-30-2018, 12:01 AM
#14
Pienoet
Unregistered
 
(10-18-2016, 03:20 AM)jmorriz Wrote: Someone asked me to post the Java code I'm using.  You'll need some Java knowledge to put it into your own executable program.  Here it is:


Code:
               BufferedReader in = null;
               try {
                   File file = new File(Config.DOLPHIN_LOG);
                   String line;
                   boolean sentEscape = false;
                   while (process.isAlive()) {
                       if (in == null && !file.exists()) {
                           Thread.sleep(5000);
                       } else {
                           if (in == null) {
                               in = new BufferedReader(new FileReader(file));
                           }
                           while ((line = in.readLine()) != null) {
                               if (line.endsWith("N[OSREPORT]: EXI IPL-DEV: write 0 at a1000800")) {
                                   // wii menu was selected.  tell dolphin to exit
                                   Robot robot = new Robot();
                                   robot.keyPress(KeyEvent.VK_ESCAPE);
                                   sentEscape = true;
                               }
                           }
                           if (sentEscape) {
                               for (int i = 0; i < 5; i++) {
                                   if (process.isAlive()) {
                                       Thread.sleep(1000);
                                   }
                               }
                               if (process.isAlive()) {
                                   Runtime.getRuntime().exec("taskkill.exe /F /IM Dolphin.exe");
                               }
                           }
                       }
                   }
               } catch (Exception e) {
                   e.printStackTrace();
               }
               try { if (in != null) in.close(); } catch (Exception e) {}

Hi this is great exactly what i was looking for.

Can you pls tell me how to create a executable and where to put it in my system?

I'm using LibreELEC on my intel NUCi5BNH.

Thank you very much!
Reply
« Next Oldest | Next Newest »
Pages (2): « Previous 1 2


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode