The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SDL2::platform - Platform Defined Values

SYNOPSIS

    use SDL2 qw[:platform];
        warn SDL_GetPlatform( );

DESCRIPTION

SDL2::platform contains functions for dealing with the current platform.

Functions

These may be imported by name or with the :platform tag.

SDL_GetPlatform( )

Get the name of the platform.

        if ( SDL_GetPlatform( ) eq 'Linux' ) {
                # ...
        }

Here are the names returned for some (but not all) supported platforms:

  • "Windows"

  • "Mac OS X"

  • "Linux"

  • "iOS"

  • "Android"

Returns the name of the platform. If the correct platform name is not available, returns a string beginning with the text "Unknown".

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.

AUTHOR

Sanko Robinson <sanko@cpan.org>