Commit graph

64 commits

Author SHA1 Message Date
Randy Heit
16d8af6b77 Add some 21:9 resolutions 2016-03-03 17:59:55 -06:00
Randy Heit
79f0714341 Update ratios[] tables for SDL and Cocoa 2016-03-03 17:32:30 -06:00
alexey.lysiuk
0822485593 Used ISO Latin 1 encoding for text in startup window on OS X
Attempts to output errors with bad characters encountered during text lumps parsing were failed miserably because of UTF-8 conversion
Example: loading of GZ-Models-r16.pk3 with GZDoom caused 'NSConcreteAttributedString initWithString:: nil value' exception
2016-02-28 23:15:23 +01:00
alexey.lysiuk
243f59d96d Made sure that the last text line is always visible in OS X startup window
These case are handled specifically:
* When waiting for clients or host to join
* When showing a fatal error
2016-02-28 23:15:22 +01:00
alexey.lysiuk
067b421f39 Fixed default width of progress bar in OS X startup window
If window was resized before progress bar appears it will have hardcoded and so incorrect width
2016-02-28 23:15:21 +01:00
alexey.lysiuk
64f80456ad Initialized scroll view with the same rectangle as other controls in OS X startup window 2016-02-28 23:15:20 +01:00
alexey.lysiuk
145b7be0a1 Fixed particular slowdown in OS X startup window
During loading of .pk3 that stores hundred of .wad's significant amount of time were spent on scrolling text to the last line
The same applies to other cases like output of thousands warnings/errors
2016-02-28 23:15:19 +01:00
alexey.lysiuk
c687394f72 Added generic way to do periodic updates of OS X startup window
It's used to avoid updating of window (progress bar in particular) too often
Most of time were spent on UI events processing but not on data loading
2016-02-28 23:15:18 +01:00
alexey.lysiuk
0fba6563c7 Disabled fullscreen mode for OS X startup window
There is no use for auxiliary fullscreen window because it behaves really weird
2016-02-28 23:15:17 +01:00
alexey.lysiuk
9e016bbfc3 Removed useless operations from OS X system code
No more 'expression result unused' warnings
2016-02-27 12:48:26 +02:00
alexey.lysiuk
202aea61e5 Fixed incorrect comparison in OS X console window
No more 'comparison between pointer and integer' error
2016-02-27 12:48:12 +02:00
alexey.lysiuk
7b0f557514 Enabled zoom window button on OS X
Independently from OS version the game will enter fullscreen mode when zoom button is clicked
Window zooming behavior introduced in Yosemite is available on all supported versions of OS X
2016-01-31 10:42:16 +02:00
alexey.lysiuk
4b210a839a Fixed uninitialized variable in IOKit controller handler 2016-01-24 14:43:55 +02:00
alexey.lysiuk
24501dbc93 Fixed copy to pasteboard on legacy OS X
Copy/paste is now implemented using the method available on all supported versions
This fixes 'unrecognized selector' exception on OS X 10.4 and 10.5
2016-01-17 11:58:44 +02:00
alexey.lysiuk
bfc116b2a4 Fixed exit crash on legacy OS X
There is no need to close (and thus deallocate) console window explicitly
This will be done by autorelease pool in application controller event loop
OS X with GC and/or ARC was not affected by this issue
Older versions like 10.4 or 10.5 crashed because of double deallocation
2016-01-17 11:51:46 +02:00
Braden Obrzut
0c3b468e42 Merge branch 'osx_start_wnd' 2016-01-11 20:47:06 -05:00
alexey.lysiuk
b27fdcffb5 Added shortcut to toggle fullscreen on OS X
Press Command+F to toggle fullscreen mode in native OS X backend
Set k_allowfullscreentoggle CVAR to false to disable the shortcut
2016-01-09 17:12:58 +02:00
Braden Obrzut
a1e0ac0b71 Merge branch 'osx_start_wnd' of git://github.com/alexey-lysiuk/gzdoom into osx_start_wnd 2016-01-04 22:11:46 -05:00
alexey.lysiuk
699f274b06 Fixed mouse cursor centering in fullscreen mode
Native OS X backed didn't center mouse cursor in fullscreen mode with Retina/HiDPI support enabled
Incorrect size of content view led to placement of cursor in upper right corner of the screen upon releasing of mouse capture
When some action is assigned to this corner using system Hot Corners feature, the given action was triggered on acquiring mouse capture
2016-01-04 10:51:54 +02:00
alexey.lysiuk
94fec26cb6 Fixed runtime warning on OS X 10.4 Tiger
The 'invalid pixel format attribute' warning was introduced with automated graphics switching control
2015-12-31 11:00:05 +02:00
alexey.lysiuk
63993dee96 Hid resize indicator on OS X startup window
The resize indicator overlapped with progress bar and Quit/Cancel button on 10.6 and older versions
OS X 10.7 and newer don't have this indicator at all
2015-12-30 16:05:16 +02:00
alexey.lysiuk
3466a8c7a9 Disabled miniaturization for OS X startup window
Old versions of OS X don't support changing of window style mask
2015-12-30 12:19:50 +02:00
alexey.lysiuk
db207feed1 Added missing header #include for old OS X SDKs 2015-12-30 12:17:38 +02:00
alexey.lysiuk
3af95e0aea Added native startup window for OS X 2015-12-29 15:19:42 +02:00
alexey.lysiuk
673e1b4faf Fixed compilation warning when building with OS X 10.11 SDK
The warning was 'null passed to a callee that requires a non-null argument'
2015-12-29 15:14:41 +02:00
alexey.lysiuk
2c3d9e3ab8 Fixed mouse capturing when video isn't initialized yet 2015-12-29 14:52:31 +02:00
alexey.lysiuk
15a269db9d Extended NSWindow with ability to exit application upon closing by user 2015-12-29 14:52:27 +02:00
alexey.lysiuk
3676a42512 Added missing include guard in i_common.h 2015-12-29 14:52:22 +02:00
alexey.lysiuk
0efdccd942 Separated POSIX's i_system.cpp from native OS X implementation 2015-12-29 14:52:18 +02:00
alexey.lysiuk
6f3e04785d Added preprocessor macros for AppKit framework versions
These macros are needed to build with earlier OS X SDKs
2015-12-29 14:52:11 +02:00
alexey.lysiuk
916b5f796d Updated list of video resolutions for Cocoa backend
Added resolutions for iMac Retina 4K 21.5"
Added comments about a few resolutions specific to Macs
2015-10-14 13:17:21 +03:00
Braden Obrzut
3adda344b6 - Missing common resolution 1680x1050 added to resolution list of SDL and Cocoa. 2015-07-06 02:58:01 -04:00
alexey.lysiuk
ebd8f24103 Fixed compilation with OS X SDK 10.4 2015-04-05 11:39:49 +03:00
alexey.lysiuk
193b491b63 Added control of automatic graphics switching on OS X
Automatic graphics switching is enabled by default
Set vid_autoswitch CVAR to false to disable it
2015-04-04 17:36:55 +03:00
alexey.lysiuk
64d663397b Added video resolution of new 12" MacBook, 2304-by-1440 2015-03-14 11:39:47 +02:00
alexey.lysiuk
5336f1085c Fixed incorrect value that I_FPSTime() may return when OS X thread-based timer implementation is used 2015-01-11 10:30:30 +02:00
alexey.lysiuk
83c6798651 Fixed a very slim chance that window will be white and empty after startup
There are a few quite specific steps to reproduce this issue:
* 640x480 video resolution
* -iwad ... -warp ... command line parameters
* OS X 10.4 or 10.5 PowerPC, maybe performance related
When all these requirements are met, content view doesn't show up sometimes
The simplest solution for this issue is to set initial window size to non-existent video resolution
2015-01-07 14:50:55 +02:00
alexey.lysiuk
324a1a7b77 Added support for dynamic device attachment and removal to IOKit gaming controllers handling 2015-01-06 13:40:39 +02:00
alexey.lysiuk
04d3802960 Fixed build issue with OS X SDK 10.4 2015-01-05 18:12:07 +02:00
alexey.lysiuk
b59fc59539 Added missing header comment 2015-01-05 17:26:06 +02:00
alexey.lysiuk
cb681aad2d Rearranged header files and #include's
Removed unused OS version check
Reduced number of headers
Fixed build with SDK 10.4
2015-01-05 17:24:54 +02:00
alexey.lysiuk
d418648e59 Fixed compiler warning with format string parameter 2015-01-05 15:46:57 +02:00
alexey.lysiuk
31d232e886 Added polling of analog axes to IOKit gaming controllers handling
This feature helps a lot with buggy gamepads that constantly generate events from "sticky" hats/sticks
Polling is enabled by default, use joy_axespolling CVAR to turn it on/off
2015-01-05 13:22:53 +02:00
alexey.lysiuk
aa1f51d3d2 Reimplemented gaming controllers support in native OS X backend using pure IOKit 2015-01-04 14:08:53 +02:00
alexey.lysiuk
68dbd56eab Small cleanup in i_video.mm 2014-12-29 18:03:36 +02:00
alexey.lysiuk
1c102ef9c9 Internals of native OS X backend event processing are no longer exposed 2014-12-29 12:16:17 +02:00
alexey.lysiuk
21d557ee11 Further cleanup of i_main.mm 2014-12-29 12:10:18 +02:00
alexey.lysiuk
e3f92db395 Custom cursor in OS native backend without global variable 2014-12-29 11:34:57 +02:00
alexey.lysiuk
51afe8a541 Removed explicit release of window in Cocoa IVideo implementation
It caused a crash on older OS X like 10.5 and it absence doesn't lead to a memory leak
2014-12-29 10:29:16 +02:00
alexey.lysiuk
4662069b94 Fixed compilation issues with GCC 4.2 2014-12-28 17:11:30 +02:00