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

Add support for SDL2 #6173

Closed
DorpsGek opened this issue Nov 22, 2014 · 10 comments

Comments

@DorpsGek
Copy link

commented Nov 22, 2014

ignatenkobrain opened the ticket and wrote:

https://wiki.libsdl.org/MigrationGuide

Reported version: Version?
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6173
@DorpsGek

This comment has been minimized.

Copy link
Author

commented Nov 22, 2014

Alberth wrote:

So far, SDL2 seems slower


This comment was imported from FlySpray: https://bugs.openttd.org/task/6173#comment13638
@DorpsGek

This comment has been minimized.

Copy link
Author

commented Nov 25, 2014

Marctraider wrote:

lol, nvm that :p


This comment was imported from FlySpray: https://bugs.openttd.org/task/6173#comment13640
@TrueBrain TrueBrain changed the title Please port to SDL2. It will add some cool features. Add support for SDL2 Apr 11, 2018
@frosch123 frosch123 removed the Core label Apr 14, 2018
@andythenorth

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2019

Although this would be nice to have, it isn't something we expect to fulfill in the next year, and on that basis I'm closing it. We do this to keep the project manageable, productive and fun. We hope you do understand. Thanks for contributing though! Here you can find more about how we handle feature requests.

@nikolas

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

I'm going to look into what kinds of changes this will require and see if I can get something working. Should be fun! Relevant docs:

@nikolas

This comment has been minimized.

Copy link
Contributor

commented Jan 20, 2019

I've gotten OpenTTD's SDL video driver working with SDL 2 on this branch. https://github.com/nikolas/OpenTTD/tree/sdl2 A work in progress: unicode/compose key input isn't working yet.

I'm also not sure if it makes sense to make a new video driver: sdl2_v.cpp to leave the option of using SDL 1.2, or just update the current sdl_v.cpp to 2.0.

@LordAro

This comment has been minimized.

Copy link
Member

commented Jan 20, 2019

I wouldn't expect to need to support both versions of SDL, they're quite different and supporting both will just make things difficult.

@LordAro LordAro reopened this Jan 20, 2019
@LordAro

This comment has been minimized.

Copy link
Member

commented Jan 20, 2019

You might find https://github.com/FreeRCT/FreeRCT/blob/master/src/video.cpp interesting to look at - it uses SDL2 and there are some similarities to OTTD's codebase (I think it was converted from 1.2 to 2 at some point in the history as well)

@orudge

This comment has been minimized.

Copy link
Contributor

commented Jan 22, 2019

I've had a play with your code, @nikolas, and it seems to be working well for me (although I must stress I haven't tested it extensively!). I was also able to combine it with my (currently very experimental and incomplete) UWP port of OpenTTD, and it works there too. :)

@nikolas

This comment has been minimized.

Copy link
Contributor

commented Jan 22, 2019

Cool, good to hear. Currently there are problems with text input on my sdl2 branch: when typing in a text box, certain keys are interpreted as key shortcuts, and random windows like the road builder pop up when they shouldn't. Once I fix that I think I'll open a pull request.

nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 23, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 23, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 23, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 24, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 24, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 25, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 25, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 25, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 26, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 26, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 26, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 27, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jan 29, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 11, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 11, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 13, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 19, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 23, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 25, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Apr 29, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue May 2, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue May 2, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue May 7, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue May 15, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue May 24, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue May 31, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jun 3, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jun 14, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jun 30, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jul 13, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jul 19, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jul 26, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Jul 28, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Aug 2, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Aug 17, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Sep 9, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Sep 14, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Sep 17, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Sep 17, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Sep 17, 2019
nikolas added a commit to nikolas/OpenTTD that referenced this issue Sep 17, 2019
nielsmh added a commit that referenced this issue Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.