Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#847 closed defect (fixed)

[PATCH] Mac: Not all screen space is being used

Reported by: Kieran P Owned by: Echelon9
Priority: Must Have Milestone: Alpha 9
Component: Core engine Keywords:
Cc: Kenny Long Patch:

Description

On Mac OS X, only 1024x768 appears to be rendered, even though my screen size is 1280x800.

It would be nice to be able to play on a Mac using actual full screen.

Attachments (2)

t847_osx-getvideomode-v1.patch (821 bytes ) - added by Echelon9 12 years ago.
First proposed patch
t847_osx-getvideomode-v2.patch (1.3 KB ) - added by Echelon9 12 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 by Erik Johansson, 13 years ago

Summary: Mac: No all screen space is being usedMac: Not all screen space is being used

Are you sure you don't have any settings in e.g. local config or so that might interfere? Just to rule out the obvious :)

comment:2 by Kieran P, 13 years ago

Consider the obvious ruled out ;-) No settings that would make it like that.

The actual game runs in full screen, but I have black bars on the left and right which reduce the size of the screen to 1024x768

comment:3 by Philip Taylor, 13 years ago

gfx_get_video_mode in lib/sysdep/os/osx/osx.cpp needs to be implemented somehow - currently it'll always default to 1024x768 in fullscreen.

comment:4 by Kimball, 13 years ago

Are you still experiencing this problem? I've been able to run the game at 1440x900 since I first joined the team, and nothing seems to have changed. One thing is that if you leave '0' as the screen values in the config files, it will default to 1024x768, but if you manually enter your display dimensions it'll work.

comment:5 by Kieran P, 13 years ago

Milestone: BacklogAlpha 7

The point is not whether custom screen resolution works (I haven't tested, but I assume it does).

The game should be smart enough to determine your screen resolution automatically.

So yes, the game still has this issue where it won't detect my screen resolution.

comment:6 by Kieran P, 13 years ago

Owner: set to Kenny Long

comment:7 by Kieran P, 13 years ago

Priority: Nice to HaveIf Time Permits

comment:8 by Kenny Long, 13 years ago

Priority: If Time PermitsShould Have

comment:9 by historic_bruno, 13 years ago

Milestone: Alpha 7Alpha 8

comment:10 by Kieran P, 12 years ago

Milestone: Alpha 8Alpha 9
Priority: Should HaveMust Have

This is becoming quite a critical issue for Mac users. I don't know the details, but I hear SDL 1.3 has a fix for it, but because it's in development, we can't use it? Why can't we bundle SDL 1.3 in the game like we do with other things?

Or backport the fix into a bundles copy of SDL 1.2? I'm pushing this to Alpha 9 because we don't have time to fix it, but im also raising it's importance from 'Should have' to a 'Must have' because it's stopping us from saying that we have true cross platform support.

by Echelon9, 12 years ago

First proposed patch

comment:11 by Echelon9, 12 years ago

Owner: changed from Kenny Long to Echelon9

Here's a quick patch that reflects the Apple system calls required to query screen x, y, bits per pixel and frequency. It impletements GetVideoMode() in lib/sysdep/os/osx/osx.cpp

As I haven't fully compiled on Xcode yet, I'm flagging that there may be initial problems to fix with this patch to ensure the right headers are included. That isn't a huge problem and is quickly fixed once I can compile trunk cleanly.

comment:12 by Echelon9, 12 years ago

Cc: Kenny Long added
Keywords: review added
Summary: Mac: Not all screen space is being used[PATCH] Mac: Not all screen space is being used

by Echelon9, 12 years ago

comment:13 by historic_bruno, 12 years ago

I think we can at least support 10.5 by detecting the user's OS X version at runtime, since the API we're using is only slightly different in either case? We'd probably use Gestalt with the gestaltSystemVersionMajor and gestaltSystemVersionMinor constants. That's preferable to either having a broken game on 10.5 or building separate binaries :)

comment:14 by Echelon9, 12 years ago

The way the Mac bundle is being compiled (SDKROOT=macosx10.6) means that we don't support OS X 10.5 currently in any case.

I'm recommending that v2 of the patch be committed to trunk, as it correctly works on 10.6-10.7

in reply to:  14 ; comment:15 by historic_bruno, 12 years ago

Replying to Echelon9:

The way the Mac bundle is being compiled (SDKROOT=macosx10.6) means that we don't support OS X 10.5 currently in any case.

I'm recommending that v2 of the patch be committed to trunk, as it correctly works on 10.6-10.7

The more I look into this, the more I'm beginning to feel the same way. Supporting 10.5 would be nice but shouldn't prevent us from having proper Mac support. The strange thing is 10.5 is only a little over 4 years old, whereas we support "ancient" versions of Windows that are a decade old by comparison. I guess that's because of the major architecture shift that Macs went through, unlike PCs. But it just feels wrong to say we only support OS X from the last two years :(

Anyway I will test your patch on 10.6 and 10.7 (always good to double check) and commit if it works.

in reply to:  14 comment:16 by historic_bruno, 12 years ago

Replying to Echelon9:

The way the Mac bundle is being compiled

Also, I should mention that is likely to change, we discussed Mac support at some length in yesterday's meeting. Most likely is that we'll scrap the premake bundle for typical builds, and only use a bundle when it comes time to deploy. It's not certain if we'll use premake to generate the bundle or some other method. Whatever works and is easiest to maintain I guess :) So how the bundle is currently configured shouldn't be the limiting factor for what versions of OS X we support.

in reply to:  15 comment:17 by Echelon9, 12 years ago

Replying to historic_bruno:

The more I look into this, the more I'm beginning to feel the same way. Supporting 10.5 would be nice but shouldn't prevent us from having proper Mac support. The strange thing is 10.5 is only a little over 4 years old, whereas we support "ancient" versions of Windows that are a decade old by comparison. I guess that's because of the major architecture shift that Macs went through, unlike PCs. But it just feels wrong to say we only support OS X from the last two years :(

The transition from 10.6 or newer was strongly evidenced due to (1) the 10.6 software update being only US$20 or so, and (2) the strong growth in Mac hardware sales has really taken off in the last two years, so many Mac users have only ever used 10.6+

comment:18 by ben, 12 years ago

Resolution: fixed
Status: newclosed

(In [10897]) Implements GetVideoMode on OS X (10.6+ compatible), based on patch by Echelon9. Fixes #847.

comment:19 by historic_bruno, 12 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.