~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/osd/sdl/video.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
//
10
10
//============================================================
11
11
 
12
 
#include <SDL/SDL.h>
13
 
// on win32 this includes windows.h by itself and breaks us!
14
 
#ifndef SDLMAME_WIN32
15
 
#include <SDL/SDL_syswm.h>
16
 
#endif
17
 
 
18
12
#ifdef SDLMAME_X11
19
13
#include <X11/extensions/Xinerama.h>
20
14
#endif
41
35
#include <os2.h>
42
36
#endif
43
37
 
 
38
#include "sdlinc.h"
 
39
 
44
40
// MAME headers
45
41
#include "emu.h"
46
42
#include "rendutil.h"
163
159
 
164
160
void sdlvideo_monitor_refresh(sdl_monitor_info *monitor)
165
161
{
166
 
        #if (SDL_VERSION_ATLEAST(1,3,0))
 
162
        #if (SDLMAME_SDL2)
167
163
        SDL_DisplayMode dmode;
168
164
 
169
165
        SDL_GetDesktopDisplayMode(monitor->handle, &dmode);
283
279
                        info_shown = 1;
284
280
                }
285
281
        }
286
 
        #endif //  (SDL_VERSION_ATLEAST(1,3,0))
 
282
        #endif //  (SDLMAME_SDL2)
287
283
}
288
284
 
289
285
 
354
350
//  add_primary_monitor
355
351
//============================================================
356
352
 
357
 
#if !defined(SDLMAME_WIN32) && !(SDL_VERSION_ATLEAST(1,3,0))
 
353
#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
358
354
static void add_primary_monitor(void *data)
359
355
{
360
356
        sdl_monitor_info ***tailptr = (sdl_monitor_info ***)data;
385
381
//  monitor_enum_callback
386
382
//============================================================
387
383
 
388
 
#if defined(SDLMAME_WIN32) && !(SDL_VERSION_ATLEAST(1,3,0))
 
384
#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
389
385
static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data)
390
386
{
391
387
        sdl_monitor_info ***tailptr = (sdl_monitor_info ***)data;
446
442
        sdl_monitor_list = NULL;
447
443
        tailptr = &sdl_monitor_list;
448
444
 
449
 
        #if (SDL_VERSION_ATLEAST(1,3,0))
 
445
        #if (SDLMAME_SDL2)
450
446
        {
451
447
                int i;
452
448
 
494
490
//  pick_monitor
495
491
//============================================================
496
492
 
497
 
#if (SDL_VERSION_ATLEAST(1,3,0)) || defined(SDLMAME_WIN32)
 
493
#if (SDLMAME_SDL2) || defined(SDLMAME_WIN32)
498
494
static sdl_monitor_info *pick_monitor(sdl_options &options, int index)
499
495
{
500
496
        sdl_monitor_info *monitor;
580
576
                ui_popup_time(1, "Keepaspect %s", video_config.keepaspect? "enabled":"disabled");
581
577
        }
582
578
 
583
 
        if (USE_OPENGL || SDL_VERSION_ATLEAST(1,3,0))
 
579
        if (USE_OPENGL || SDLMAME_SDL2)
584
580
        {
585
581
                //FIXME: on a per window basis
586
582
                if (ui_input_pressed(machine, IPT_OSD_5))
654
650
                video_config.mode = VIDEO_MODE_OPENGL;
655
651
                video_config.prefer16bpp_tex = 1;
656
652
        }
657
 
        else if (SDL_VERSION_ATLEAST(1,3,0) && (strcmp(stemp, SDLOPTVAL_SDL13) == 0))
 
653
        else if (SDLMAME_SDL2 && (strcmp(stemp, SDLOPTVAL_SDL13) == 0))
658
654
        {
659
655
                video_config.mode = VIDEO_MODE_SDL13;
660
656
                video_config.prefer16bpp_tex = 1;
676
672
                video_config.syncrefresh = 0;
677
673
        }
678
674
 
679
 
        if (USE_OPENGL || SDL_VERSION_ATLEAST(1,3,0))
 
675
        if (USE_OPENGL || SDLMAME_SDL2)
680
676
        {
681
677
                video_config.filter        = options.filter();
682
678
        }
765
761
        // misc options: sanity check values
766
762
 
767
763
        // global options: sanity check values
768
 
#if (!SDL_VERSION_ATLEAST(1,3,0))
 
764
#if (!SDLMAME_SDL2)
769
765
        if (video_config.numscreens < 1 || video_config.numscreens > 1) //MAX_VIDEO_WINDOWS)
770
766
        {
771
767
                mame_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens);