Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Allow finger movement while pressing button #295

Merged
merged 4 commits into from Apr 23, 2014
Merged

Android: Allow finger movement while pressing button #295

merged 4 commits into from Apr 23, 2014

Conversation

Hydr8gon
Copy link
Member

Previously when pressing an on-screen button, as soon as your finger moved the slightest, the button would be released. This made it very hard to hold buttons down. With this patch, the button will stay pressed until you let go.

Resubmitted because the previous PR changed the permission of the file due to whatever I did to cause it.

@magumagu
Copy link
Contributor

You can just force-push (push -f) on top of your branch if there's something wrong with it.

@dolphin-emu-bot rebuild

@lioncash
Copy link
Member

Looks fine to me.

@delroth
Copy link
Member

delroth commented Apr 22, 2014

Wouldn't that set the button as pressed even if the movement did not start on that same button?

For example, swiping on all the buttons with this change would set all the buttons as pressed. Am I right?

@delroth
Copy link
Member

delroth commented Apr 22, 2014

I see. Not familiar with the Android code at all, sorry. Now that I've read
the whole method, it makes sense.

On Tue, Apr 22, 2014 at 3:49 AM, Sean notifications@github.com wrote:

@delroth https://github.com/delroth no. Example: you start by pressing
A, then swipe your finger over B. This /will/ activate B, but it will also
deactivate A.


Reply to this email directly or view it on GitHubhttps://github.com//pull/295#issuecomment-40996113
.

Pierre "delroth" Bourdon delroth@gmail.com
Software Engineer @ Zürich, Switzerland
http://code.delroth.net/

@Hydr8gon
Copy link
Member Author

@delroth Actually, you were right, which is why I deleted my comment. Fix incoming.

Now, your finger can still move around, but as soon as it leaves the button boundaries the button is released.
@lioncash
Copy link
Member

I would add braces to the if and else statements. Especially with a comment of that size in the else case. IMO no brace if statements should only be used if only one line of code will sit after the if or else and nothing else. (sorry for the nitpick)

@Hydr8gon
Copy link
Member Author

@lioncash Fine with me.

@lioncash
Copy link
Member

err... sorry to be that guy again, but we use brace on the next line.

protip: You can roll back to the previous commit to do changes with git rebase -i <SHA ID of the commit before the one you want to make changes on>

ie) Imgur

Now say I want to roll back to "Some very minor cleanup to the logging window code", I hit the i key on my keyboard and change it to the following:

Imgur

Then I hit escape and type :wq. This basically means "Write changes and quit".

Now we get:

Three

There, we're successfully rolled back to that commit! So now you can make whatever changes you want to the source file you were working on, then do git add -u, and then git commit --amend then just type :wq again. Now the original commit is updated. So to roll back forwards again, just do git rebase --continue and it should bring you back to your current commit with the changes.

Then just push your changes with git push -f [your remote] [your branch name].

Just figured I'd tell you how to do this in case you didn't know.

@Hydr8gon
Copy link
Member Author

@lioncash I'll get right on it. (Or not, my OS X terminal likes to glitch out for whatever reason)

@lioncash
Copy link
Member

Nice, thanks :) Looks all good now.

@Sonicadvance1
Copy link
Contributor

LGTM.
@dolphin-emu-bot rebuild

Sonicadvance1 added a commit that referenced this pull request Apr 23, 2014
Android: Allow finger movement while pressing button
@Sonicadvance1 Sonicadvance1 merged commit 9f12d02 into dolphin-emu:master Apr 23, 2014
@Hydr8gon Hydr8gon deleted the button-holding branch April 23, 2014 18:50
Joern-P pushed a commit to Joern-P/dolphin that referenced this pull request Mar 16, 2023
Expose the "Speed Up Disc Transfer Rate" option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants