
Chromium: Improve support for Nintendo Switch gamepads - pplonski86
https://chromium-review.googlesource.com/c/chromium/src/+/1510080
======
owenwil
This is a pretty smart move, considering that rumors point to Google's "game
streaming service" being available on every device that runs Chrome, without
additional installation. That would mean a launch across:

* Windows

* Mac

* ChromeOS

* Linux

* Mobile

...overnight. Pretty compelling way to draw in new users given millions of
people already own a Switch controller and could start without needing to buy
Google's one.

~~~
pjc50
> Google's "game streaming service"

A number of companies, both startups and established game companies, have
tried this. It's not taken off because you can't beat latency.

~~~
simlevesque
Not every gamer cares about latency.

~~~
bpye
Personal opinion: I suspect it's something most gamers care about even if they
don't realise they do. If your controls feel disconnected from your gaming
experience then you will get frustrated pretty quick.

------
Insanity
Not being a C/C++ programmer, I wonder why they postfix their variables with
"underscore"?

[https://chromium-
review.googlesource.com/c/chromium/src/+/15...](https://chromium-
review.googlesource.com/c/chromium/src/+/1510080/13/device/gamepad/gamepad_device_linux.cc)

e.g: switch_pro_4, dualshock_ps4_, ...

It does not happen for all variables, what is this convention? :o

~~~
cmrdporcupine
Google C++ style guide. It's for instance variables on classes, to distinguish
from local variables.

[https://google.github.io/styleguide/cppguide.html#Variable_N...](https://google.github.io/styleguide/cppguide.html#Variable_Names)

~~~
joshvm
Is there a reason for not using 'this'? I assume the risk is that you might
have a scope where both this->foo and foo are valid and it's unclear which is
which. You have no ambiguitiy with this->foo_, and foo (and if you forget
'this', foo_ is still clear).

~~~
pjc50
It's unidiomatic?

> scope where both this->foo and foo are valid and it's unclear which is which

Ideally you'd turn on the compiler option to warn about scope hiding.

~~~
joshvm
Maybe, though it's a common thing I've seen in setter functions or
constructors:

Eg void set_foo(int foo) {this->foo = foo;}

------
retSava
OT: I'm quite disappointed by the switch hardware. We're using it lightly in
our family, not tugging it around or travel with it. Mostly game with it
docked. Ca 1 year old at this time.

The controllers have both been plagued by the issue of dust entering the
analog sticks, making it drift. You can't calibrate this away (tried it). Nor
did it for us help with a spray can of air to blow it away, but perhaps I was
holding it wrong (snark). Had to send it away for repair and they changed both
analog sticks.

A new set of controllers (ie two sticks) also cost almost twice what an
official PS4 dualshock controller costs. A single costs about as much as a
PS4DS. Also, the PS4 one feels so much more robust.

For a controller that is meant to be used on the go, I find the poor dust-
resistance and high cost of replacement very off-putting. I get the feeling
that they, or something else on the switch, is gonna break again soon.

Puh, sorry for the rant.

~~~
moontear
A rant this is. Send them in. You‘ll get new ones without flaws.

Dragging my Switch everywhere haven’t had a single problem ever with my joy
cons not with the pro Controller. Friends had problems, got their joy cons
replaced - all good now.

~~~
retSava
Do you mean there is a new controller version that is more robust, or simply
replaced with ones that aren't (yet) dusty?

If the latter, it's just a question of time before one has to do the same
ordeal again. I'd prefer the problem not to arise in the first place. But good
thing Nintendo are generous with replacements.

~~~
nolok
No, he is saying the vast majority of people don't have those issues so short
of exagerating* you probably have deficient ones, and simply need to get them
exchanged for new ones .

* you know, like saying "oh this issue is really bothing me but no I won't change them because it would just happen again anyway I'm sure of it even though most of others aren't affected". This is a definite case of "the user is not looking for a solution, but for a chance to rant", we've all seen it one time or another

------
aboutruby
I made a gist from the base64 patch for easier reading:
[https://gist.github.com/localhostdotdev/f07d7ba7ae6cac4ea1c8...](https://gist.github.com/localhostdotdev/f07d7ba7ae6cac4ea1c8976a41400d43)

------
wslh
Is there a plan to support Chrome in the Nintendo Switch? The rumours (which
are mainly speculation or clickbait pages) talk about just supporting the
gamepads.

~~~
TwoNineA
Maybe to add controller support for the upcoming Google game streaming
console?

------
yegle
Huh that's weird. I was a beta tester of Project Stream during the holiday
season. I travelled with a Pixelbook and before my travel I tested all my
controllers: PS4/Xbox/Nintendo and even an NVIDIA shield controller. Only
Nintendo Pro Switch controller can be paired with the Chromebook.

The only problem is that A/B and X/Y is different between Xbox and Nintendo
controller and you need to press B when the game tells you to press A. But
it's a minor issue.

~~~
mikewhy
> The only problem is that A/B and X/Y is different between Xbox and Nintendo
> controller and you need to press B when the game tells you to press A. But
> it's a minor issue.

It's also different with Xbox and PS4 controllers. It's something I got used
to a while ago after using DS3 controllers in Windows games.

Lots of PC games nowadays detect PS4 controllers and properly adjust UI (or
even work with the lightbar), but I doubt Project Stream / browser controller
APIs get that level of info.

------
YUMad
Well except two points:

\- Switch doesn't even have a browser (it does technically, but it's
internally used and you need to hack the switch to be able to use the browser)

\- Nintendo could easily change this if they wanted, of course, but
considering their history of tight control over the platform, I don't think
they'd be willing.

~~~
geofft
This is for support for Nintendo Switch _gamepads_ when connected to a normal
computer over USB or Bluetooth, not for running Chromium itself on the Switch
_console_.

------
clanrebornx
Wonder why not write it in Go or Rust, c++ limits contribution to old
developers only

None of my friends know c++

But all of them know Go or Rust.

~~~
dev_north_east
Well the first thing to realise is that you live in a bubble.

~~~
clanrebornx
Yes, I am in SV. It's a bubble but that shouldn't be a problem, everyone
around me is Rust and Go hacker

~~~
dev_north_east
I'm not in SV but have worked in a few different areas/industries and all are
big C++ houses. I'm not old :)

I'm in a bubble too. I couldn't name a single friend or colleague who uses
Rust or Go.

Just for example, scanning the jobs in my city the most in demand are c#, java
and c++ in that order.

