HOW TO - Use your smartphone as a touch screen for citra


#1

Hi everyone! Today, I asked myself how I could use my smartphone as a touch screen when playing citra, and after looking around I figured a way that works flawlessly, so I decided to share it with you :slight_smile:

I’m using a Galaxy S8 in that turorial and it works perfectly. The app I’m using also exists for Iphone, so I suppose it should work, feel free to test it and give some feedback!

The software I’m using only exists on Windows, that might work on macOS, but I cannot confirm it.

What does it looks like?

It looks like that:

As you can see, I have a MacBook Pro, but with windows 7 :wink:
So you have the computer screen as the primary and the smartphone as the touch screen. Touch is working perfectly fine and I use a DS4 for buttons with a mount on it, just so it is a bit more comfy :slight_smile:

What do I need?

  • Your computer with citra installed
  • Your smartphone
  • A wifi network (or your phone as a hotspot with your computer connected on it)
  • SpaceDesk for Windows (link in the tutorial)
  • SpaceDesk for android or iphone (find it on the play store or the app store)
  • (Optional) A dualshock 4 controller or any controller for your computer)
  • (Optional) A holder for your cell

Step 1: Install SpaceDesk on your computer

First step is to install SpaceDesk on your computer, link here:

Be sure to download the good version for you!

The installation is pretty straightforward, it’s a classic next, next, next, finish thing. When there are prompts asking you to install drivers, just click on “install”. When it’s done, the setup will ask you to restart the computer, you have to or it won’t work.

Once your computer has restart, you won’t see SpaceDesk in any menu, it’s just a driver so your phone will be considered as a second screen, all settings are client side. You still can uninstall it from the control panel.

Step 2: Install SpaceDesk on your phone

This one is pretty easy, go on the store and search for “SpaceDesk”, and then install it. Those instructions are for android, it must be similar for IOS:

If your computer and phone are already connected on the same network, you should see your computer name in the list as soon as you open the app on your phone.

Go into “Settings” and you’ll see five menus:

  • Quality/Performance
  • Resolution
  • Touchscreen
  • Rotation
  • Connection

In Quality/Performance, since I have a good Wifi router and a recent phone with a good Wifi card, I put Image Quality at Max and Color Depth at Medium (Since I wouldn’t see any difference with High anyway). You can experiment with that, but I’m pretty sure you’ll be fine with Max settings as well :wink:

For “Rotation” YOU HAVE to deactivate the auto-rotation option, else it will glitch everytime you move your phone, because the app will change the resolution everytime.

That’s it for settings, you don’t have to change anything else.

STEP 3: Connect your phone as a second screen for your computer

You have multiple choices when it comes to network here:

  • The classic one, you can just connect your computer and your phone on the same network, like at home, this is probably what you will do.
  • As an exemple, I work in a gas station at night, so I have plenty of free time to play but no network at my workplace. You can just use your phone as a Mobile hotspot (if your computer as Wifi) or as USB tethering (If your computer does not have Wifi), but you will have to stay close to the computer or have a long usb cable if you wanna play sitting in the couch at grandma’s :wink: CAREFUL, if you use that method, you should turn off your phone mobile data if you don’t have much in your monthly plan!

There are other ways to connect those your computer and phone on the same network, but those 2 were the only ones I though could be useful at the moment.

Once they are on the same network, just click on the IP adress under your computer in the app.

If everything is fine, you should see your computer screen on your phone, and your computer will probably flicker and change resolution, this is because it uses the same one as your phone screen.
Let’s correct that to have it the way we want:

Right-click on your computer desktop and click on “Screen resolution”. You will have to change settings for your screens.

So here’s what you want: (Sorry my Windows is in french, but you all the settings are in the same order)

Screen 1 is my PC, screen 2 is my phone. You want you PC monitor as your main display. Set you phone resolution to 1024x768.

I decided to put my phone screen under my computer screen, just like a 3DS, you can put them side-by-side, but the settings in Citra config file won’t be the same as mine then, and I will not cover it, you can check Adityarup_Laha’s tutorial in the tutorial section of the forum. I centered the phone under the PC, and the settings in citra depend on that.

STEP 4: Setup Citra settings

Now is time to set Citra settings so the emulator will display screens in the right places.

  1. On your keyboard, hit Windows Key+R, this will open the run window.
  2. Type %appdata% and then press Enter.
  3. In the file explorer that just popped, Go into Citra/config/ and open “qt-config” (You should make a copy of that file first, just in case).
  4. Go to the [Layout] Section
  5. Set custom_layout to true instead of false.
  6. Then you’ll find these settings:

custom_top_left=0
custom_top_top=0
custom_top_right=400
custom_top_bottom=240
custom_bottom_left=40
custom_bottom_top=240
custom_bottom_right=360
custom_bottom_bottom=480

custom_top is for your main screen (Computer) and custom_bottom for the touch screen(Phone).

Let’s say you Computer screen has a resolution of 1920x1080, and you phone has been set to 1024x768 like I showed you, here is the explanation with the good values:

custom_top_left: The left side of the top screen, you want the screen to start at the left edge of the screen, so 0 pixels.
custom_top_top: The top side of the top screen, you want the screen to start at the top edge of the screen, so 0 pixels.
custom_top_right: The right side of the top screen, you want the screen to end at the right edge of the screen, so 1920 pixels.
custom_top_bottom:: The bottom side of the top screen, you want the screen to end at the bottom edge of the screen, so it should be 1080 pixels, right? But it won’t be, citra won’t be fullscreen when running, if will be windowed but stretch all the way into both screens. You will have the top border of the windows, with the title of the software.

That border has a height of 30 pixels, so you want that setting to be the height of your resolution minus 30, so here it will be 1050.

For the bottom screen it’s a bit more tricky, check this picture, it will help you understand:

Sans%20titre

As you can see, when you will stretch Citra’s window, if will overflow on your phone screen, so you want to center the touch screen of the 3ds so it will align with your phone screen:

custom_bottom_left: For this setting, you will take your PC screen horizontal resolution, here it’s 1920, minus 1024 (horizontal resolution on your phone), divided by 2.
1920 - 1024 = 896
896 / 2 = 448.

448 will be the difference of width divided by 2, it’s where you want the touch screen to start, check the previous picture, should speak for itself.

custom_bottom_top: You want the top of the touch screen to start where the top screen ended, so 1050.
custom_bottom_right: You want the right side of the touch screen to finish at the right edge of your phone screen, so it will be where the left edge started plus the width of the touch screen, so here it is 448+1024 = 1472.
custom_bottom_bottom: you want that one to finish at the bottom edge of your phone screen, so it will be the sum of the height of the two screens, minus that 30 we left over at the beginning:
1080+768-30 = 1818.

Here are the full settings:

custom_top_left=0
custom_top_top=0
custom_top_right=1920
custom_top_bottom=1050
custom_bottom_left=448
custom_bottom_top=1050
custom_bottom_right=1472
custom_bottom_bottom=1818

Save that file and then open citra.

STEP 5: Last setting in Citra then play!

Ok, so this is the last step, in Citra, just go in “view” and unckeck “Single window mode”, that way, Citra will render the game in a separate window.

You can now launch your favorite game, and then stretch the emulation window across both screen. If you entered the good settings in the configuration file, you should see both screens where they are supposed to be. The touch is basically you computer mouse following you finger on your phone, and it works flawlessly! Have fun :slight_smile:

What about the controller?

As I said, I use a DS4 as my controller. There are plenty of tutorial about DS4Windows so you can set you controller to work just fine within windows. You can use any controller of your choice, but if you want a holder so you can put your controller and phone together like I did, I suggest a PS4 or Xbox One Controller as holders are easy to find for these two.

That’s pretty much it. It’s a bit complicated at first but you should not have too much difficulties to understand it, if you people have any suggestion so I can make it easier to understand or if you have any problem, feel free to comment here and I will try my best to help you :slight_smile:


Dual Monitor Support?
Year for Android release
Streaming citra using remotr
#2

Great research but however in your case it works well but mostly if internet connection is slow or broken that may result in a crash. Also you need a powerful Android or iOS.


#3

But great research indeed


#4

Actually, it works in local, so no internet is required at all. You could just create a local network with a router without any internet and it will still works!

Plus, you don’t need a powerful phone at all, the software is just streaming your computer screen :wink:

You can also use usb tethering on your phone as I stated, that way it creates a local network and you don’t have to rely on wireless!


#5

Is there any way to play it on mobile from PC and connecting mobile to TV. bigger screen is always better.


#6

I’m not quite sure of what you are asking, sorry… Off course you can play it on tv if you connect your pc to it, but there is no point in having the touch screen on the tv with that. You need to see what you are touching, so you have to look on your phone anyway…


#7

Hi there, thanks for this amazing and detailed tutorial, I haven´t been able to get it working, everytime that citra is launched, the modifications made to the “qt-config.ini” file resets to their defaults. I´ve made the steps correctly but I always get the same problem, I´ve changed the custom_layout to true, and then changed the settings, but after launching citra this changes resets back to the original, is there something I´m missing? Thanks in advance.


#8

Did you set the /default to false?


#9

I just tried what you told me, and have the same result, this are my layout settings:

layout_option=0
swap_screen\default=true
swap_screen=false
custom_layout\default=false
custom_layout=true


#10

Can you upload the entire section?


#11

Thanks, I changed default=false on every one of the custom layout and now I´m not having the reset problem, but now I have everythink done correctly, the first screen on 3DS it´s now showing correctly on my computer screen, but the second screen isn´t showing on my cellphone, I don´t know why, here are my full layout settings:

[Layout]
toggle_3d\default=true
toggle_3d=false
factor_3d\default=true
factor_3d=0
layout_option=0
swap_screen\default=true
swap_screen=false
custom_layout\default=false
custom_layout=true
custom_top_left\default=false
custom_top_left=0
custom_top_top\default=false
custom_top_top=0
custom_top_right\default=false
custom_top_right=1920
custom_top_bottom\default=false
custom_top_bottom=1050
custom_bottom_left\default=false
custom_bottom_left=448
custom_bottom_top\default=false
custom_bottom_top=1050
custom_bottom_right\default=false
custom_bottom_right=1472

In citra this are my “View” settings:

citraview

Thanks for all your valuable help!


#12

Yes, I am getting the same problem as Jaime. My screen is extended to my phone but the game does not show on the second screen. It only shows itself on the main display. Plzzzzz help