Linux / Mac Cross-platform tweaks ?

BlitzMax Forums/BlitzMax Programming/Linux / Mac Cross-platform tweaks ?

Armitage 1982(Posted 2010) [#1]
Hi

I successfully build my game over Mac and Linux but I have a few issues with the Linux version (and probably with the Mac too, unfortunately I can't try this one):

1)
For Local mode:TGraphicsMode = EachIn GraphicsModes()

- Correctly return GraphicsModes under Windows, not under Linux !?

2) Is there problem with the playback off OGG loop under Linux ? Some sound volume aren't correctly set while perfectly working under Windows...

3) I don't understand why keys aren't the same under Linux ?
key ['4] is equal to [ēģ] or [&1] is equal to [z] !!??

4) I still need to look at / and \ file access before but I already know I have problem with libxml to update some configuration files... While as always it's working fine under Windows :s


Also, I don't know if the last 10.04 LTS Ubuntu supported NVidia driver for OpenGl is good enough (only 195) but I have a noticeable FPS drop too :(


Brucey(Posted 2010) [#2]
4. Always use "/" on every platform. :-)


Armitage 1982(Posted 2010) [#3]
1) I found the error : under Ubuntu the driver return a depth of 24, not 16 nor 32 Bits. My "resolution selector" didn't take this in account.
This is a bit problematic for the first execution. Maybe I should use the current Desktop refresh rate AND Depth (thanks to the DesktopExtension from d-bug).

2) This one will be hard to track down.

3) Why the constant key code aren't the same ?

4) I'm correctly using / everywhere, the problem was a consequence of 1)
By the way Ziggy if you read that, Blide is always using \ in the main bmx file to create incbin resources and things alike.
And I still don't know too why '#Region &HAF Imports Import absolute .c file path

'#Region &HAF Imports
'?flags
Import "C:\BlitzMax\Projects\Metagolf\cpp\EaseEquations.c"
'?
'#EndRegion &HAF



beanage(Posted 2010) [#4]
It would be truly awesome if Ziggy implemented a cross-platform compile option, where especially this slash vs backslash trouble for imports would be removed.


Armitage 1982(Posted 2010) [#5]
2) OK I figured out !
In fact the PlaySound(snd,channel) didn't take in account the channel argument for obscure reasons. So I had to reallocate it like this:
channel=PlaySound(snd,channel)
Now it's working great :)

3) My only problem now is the keyboard control all mixed up under Linux ?


ziggy(Posted 2010) [#6]
Ziggy if you read that, Blide is always using \ in the main bmx file to create incbin resources and things alike

Incbin, Includes and Imports can be used with \ and / on any BlitzMax platform, the compiler accept both so no need to change that. In your run-time loading routines this can be different, but this has nothing to do with BLIde or BlitzMax.