This change should allow apps to render correctly in Portrait mode, at minimum,
Support for orientation changes is pending.
Thanks to Pierre-Yves for assistance!
This is part of an overall effort to use the name, "WinRT", rather than "WindowsRT" (or "Windows RT"), as the shorthand name often seems to mean something different than the longhand name. (WinRT is an API, Windows RT is a product name)
This change removes some code that attempted to allow non-standard window sizes, the idea of which was to do display scaling, and a hackish one at that. If display scaling is needed, use SDL_Renderer as appropriate.
- moved SDL_WinRTApp.* from src/video/windowsrt/ to src/core/winrt/, and renamed them to SDL_winrtapp.* (to mimick case-sensitivity used elsewhere in SDL)
- renamed all "windowsrt" directories (in src) to "winrt", as the shorthand name is used more often (and, IMO, "WinRT" != "Windows RT", not entirely at least)
--HG--
rename : src/video/windowsrt/SDL_WinRTApp.cpp => src/core/winrt/SDL_winrtapp.cpp
rename : src/video/windowsrt/SDL_WinRTApp.h => src/core/winrt/SDL_winrtapp.h
rename : src/core/windowsrt/SDL_winrtpaths.cpp => src/core/winrt/SDL_winrtpaths.cpp
rename : src/video/windowsrt/SDL_winrtevents.cpp => src/video/winrt/SDL_winrtevents.cpp
rename : src/video/windowsrt/SDL_winrtevents_c.h => src/video/winrt/SDL_winrtevents_c.h
rename : src/video/windowsrt/SDL_winrtmouse.cpp => src/video/winrt/SDL_winrtmouse.cpp
rename : src/video/windowsrt/SDL_winrtmouse.h => src/video/winrt/SDL_winrtmouse.h
rename : src/video/windowsrt/SDL_winrtvideo.cpp => src/video/winrt/SDL_winrtvideo.cpp
rename : src/video/windowsrt/SDL_winrtvideo.h => src/video/winrt/SDL_winrtvideo.h
PoopiSan
Currently on OSX and iOS simulator the values:
mach_base_info.denom = 1
mach_base_info.numer = 1
but on the real iOS device
mach_base_info.denom = 3
mach_base_info.numer = 125
The calculation is made using following formula
mach_base_info.denom / mach_base_info.numer * 1000000
but all values are int32 and the result is casted to int64.
This solves the problem:
return 1.0 * mach_base_info.denom / mach_base_info.numer * 1000000;
Patrick Maloney
Saitek p2500 (Cyborg Rumble Force Pad) has a D-pad, two analog sticks, and numerous buttons. SDL 2.x on OSX detected everything except the right-side analog stick. The right-side stick is considered a 'simulation device' with the axes mapped to throttle and rudder.
The patch adds support for throttle and rudder on the HID simulation page.
We needed a bit, so we're hoping no one needs this effect, especially when
it's fairly close to SDL_HAPTIC_SINE, we hope.
SDL_HAPTIC_LEFTRIGHT maps to XInput's functionality, so this removes the SINE
code for the XInput driver to keep things clean.
This also makes the simplified Rumble API use SDL_HAPTIC_LEFTRIGHT if
SDL_HAPTIC_SINE isn't available, to keep XInput working.
When we break the ABI, and can extend the supported capabilities field from
a Uint16, we'll add SDL_HAPTIC_SQUARE back in.
This patch is based on work by Ethan Lee.