Commit Graph

54 Commits

Author SHA1 Message Date
Benau
9d1c9fac5a Merge remote-tracking branch 'origin/master' into i18n 2015-12-14 03:00:07 +08:00
Deve
0216fd9697 Request sRGB-capable visual during creating OpenGL context.
We need it for proper working. When it's not available, then function glEnable(GL_FRAMEBUFFER_SRGB) doesn't take any effect, and then displayed image is too dark.

It doesn't solve the issue that the screen is too dark for intel graphics cards on linux, because the driver ignores this request. But still, this is the proper way to do it and it may avoid similar issues in future.

Actually we should detect that the visual is not srgb-capable, and in this case maybe make some gamma correction or filter it on our side to get similar effect.
2015-12-11 19:18:14 +01:00
Benau
2096532d0e Make stk more-i18n friendly
Now supertuxkart can do:

Windows (fully test in win8 and win7 built with vs2015, mingw not tested):
Input characters using ime (CJK tested).
Fix crashes when try to paste unicode text into editbox in stk.

Linux:
Different keymap can be used in stk now, ie typing russian,hebrew (not bidi-aware) is now possible.
IME not supported.

Mac:
No work has been done, sorry mac fanboys/girls:( Though testing is welcome, esp when pasting words into stk.

Limitation:
No ime box is shown in fullscreen

(Windows)Only the used language in current setting of non-Unicode programs can be typed with its supported IME.
2015-10-27 02:34:46 +08:00
Deve
e15cd49cae Make changing to fullscreen on linux safer.
Now we are waiting until window state is already changed to fullscreen. We are getting real window size at the end of creating window function and previously it was sometimes reporting size of the window in windowed mode, which could causing issues in gui. Previously this was workarounded by forcing minimal window size to be at least in screen resolution, but window managers don't like to have non-resizeable fullscreen windows. Now this workaround is not needed anymore.
2015-10-03 16:43:22 +02:00
Deve
35fa7fd272 Fixed a strange bug during changing window to fullscreen under Gnome 2015-09-26 20:32:55 +02:00
Deve
78cd8efdd4 Reset screensaver counter on linux when joystick event was received 2015-08-09 18:54:59 +02:00
Flakebi
d2ca7d11d7 Remove unused/commented out code 2015-07-03 15:36:45 +02:00
Flakebi
fbf26df23d Merge branch 'master' into fixes
Conflicts:
	src/graphics/2dutils.cpp
	src/graphics/graphics_restrictions.cpp
	src/graphics/render_skybox.cpp
	src/graphics/rtts.hpp
2015-07-03 15:29:53 +02:00
hiker
443d570196 Make legacy somewhat working on linux (just in case). 2015-03-12 11:47:38 +11:00
Flakebi
366f8a26bb Fix more clang warnings 2015-02-05 02:44:06 +01:00
Dmitry Marakasov
94bf5949f5 Include unistd.h for usleep()
Fixes build on FreeBSD
2015-02-02 00:08:30 +03:00
Deve
4f5b84a134 Replace spaces by tabs to keep consistency with other irrlicht files. 2015-01-22 18:59:55 +01:00
Deve
5117ab0a0e Fixed issues with clipboard on linux.
Previous version didn't work for me at all when I tried to copy text from external application.
It also fixes problem with crashing GTK3 applications.
2015-01-22 18:52:26 +01:00
hiker
f724369a8e Merge branch 'freebsd-fixes' of https://github.com/leper/stk-code into leper-freebsd-fixes 2015-01-20 14:56:25 +11:00
Deve
752ad0e456 Fixed numpad keys on linux.
Patches ported from upstream irrlicht.
2015-01-04 16:09:48 +01:00
leper
1718cb2fce FreeBSD build fixes.
Irrlicht change also submitted upstream https://sourceforge.net/p/irrlicht/patches/300/.
2015-01-02 17:58:16 +01:00
Vincent Lejeune
116cdec611 Try old method of creating a context 2014-12-18 01:50:09 +01:00
Marianne Gagnon
5b043a2564 Add some debug logging on linux 2014-11-18 19:15:13 -05:00
hiker
18bcb92afc Used better variable name. 2014-11-03 21:36:54 +11:00
hiker
150941aad2 Maintain a flag that indicates if the gamepad device name is 'useful'
(on windows we might get a dummy name, identical for all gamepads).
Only add a number to the gamepad if the device has a useless default
name.
2014-11-03 16:37:19 +11:00
vlj
669c8af73e Try to fix linux, round 2 2014-09-26 23:36:13 +02:00
vlj
ac2a40837f Try to fix linux 2014-09-26 23:28:29 +02:00
vlj
18b0c65dd6 Use core context for linux too. 2014-09-26 23:21:09 +02:00
vlj
f41c1497cf Revert "Declare bool in CIrrDeviceLinux"
This reverts commit 35de5d3975.
2014-09-26 23:03:25 +02:00
vlj
35de5d3975 Declare bool in CIrrDeviceLinux 2014-09-26 23:01:45 +02:00
Vincent Lejeune
bd4602fb5d Fix context creation on linux when driver support gl 4.3 2014-09-15 23:39:48 +02:00
vlj
fbe2896460 Use non debug gl ctx in non debug build 2014-09-09 16:57:46 +02:00
Deve
db53dd6767 xrandr: Simplify code a bit.
Fixed some memory leaks.
2014-08-24 17:40:40 +02:00
Deve
c2cf83bb6a xrandr: move restore resolution to separated function because it makes a mess... 2014-08-20 19:44:06 +02:00
Deve
56fa56a38f xrandr: don't restore resolution if output was disconnected during game 2014-08-20 19:44:06 +02:00
Deve
5c4c54bf20 xrandr: make sure that output_id and old_mode are declared 2014-08-20 19:44:06 +02:00
Deve
6a48010644 Fixed compilation error with disabled xrandr 2014-08-20 06:49:38 +02:00
Deve
0dc34b2c0d xrandr: few more checks
- try to run in windowed mode if no output was found
 - close display correctly in case of no output
 - add few warnings
2014-08-18 20:56:30 +02:00
Deve
3e3a27252a xrandr: fixed memory leak 2014-08-16 16:02:22 +02:00
Deve
a9bd12bfab xrandr: use primary output if window manager reports this information 2014-08-16 12:21:55 +02:00
Deve
d45429bf88 First destroy the window, then restore resolution.
This may solve some possible issues with WM fullscreen.
2014-08-15 11:34:16 +02:00
Deve
15b316a9af xrandr: update width and height params when wanted resolution was not found and we get the default one. 2014-08-03 21:56:16 +02:00
Deve
67948dfe28 xrandr: add support for rotated screens 2014-07-31 23:13:03 +02:00
Deve
73b45e71c7 xrandr: fixed issue with fullscreen window which was placed in wrong screen in some window managers.
In some cases main screen may have other position than (0, 0) - fixed it.
2014-07-30 21:30:43 +02:00
Deve
46f73e8ecc Some improvements for xrandr
- choose best available refresh rate
 - if resolution doesn't exist, choose first available
 - other minor changes.

Works fine with Gnome, but I notices some issues on Openbox and Unity.
2014-07-28 19:23:03 +02:00
Deve
992c97258f Few more checks 2014-07-27 20:00:04 +02:00
Deve
0409a84fa0 Remove debug output 2014-07-27 19:36:40 +02:00
Deve
068b88cb4b Rename some variables, free memory etc. 2014-07-27 19:32:12 +02:00
Deve
85dd8d11a9 Add experimental support for multi-monitor on linux using xrandr.
Now you can play STK on one screen and watch TV on the second ;-)

Currently I use first (main) screen. We can detect from which screen STK was executed using xinerama.

Will be improved.
2014-07-27 00:48:34 +02:00
Deve
a56d6405dc Simplify code for checking best refresh rate on linux, which I added previously. 2014-06-25 22:22:54 +02:00
Deve
da41a06ae4 Add fallback for such exotic window managers as "larswm" which don't support netwm.
It's because Cand complains :)
2014-05-22 18:39:28 +02:00
Deve
e8b4926b0b Fixed #1313.
In some cases STK was barely playable because of very low refresh rates (25-30Hz).

This may be caused by last changes in display drivers. I remember that previously refresh rates for resolution were in order from the lowest to the greatest. Now I see it in reversed order.
Irrlicht didn't check refresh rates and always set the last available for specified resolution.

Now we use the highest available refresh rate.

Perhaps we should use xrandr library instead of vidmode. It should be much smarter and maybe would solve some multimonitor issues.
2014-05-12 18:43:36 +02:00
Vincent Lejeune
ae3cf30070 Add a function to query supported glsl ver 2014-03-22 18:36:20 +01:00
Vincent Lejeune
0243546e4d Use an openGL 3.3 compatibility context when available. 2014-02-12 22:16:10 +01:00
Vincent Lejeune
afd5d1917c Fix Opengl pre 3.0 context creation. 2014-02-02 01:03:01 +01:00