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

« back to all changes in this revision

Viewing changes to src/osd/sdl/draw13.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:
18
18
#include "options.h"
19
19
 
20
20
// standard SDL headers
21
 
#include <SDL/SDL.h>
 
21
#include "sdlinc.h"
22
22
 
23
23
// OSD headers
24
24
#include "osdsdl.h"
379
379
#if 0
380
380
                if ((PRIMFLAG_GET_SCREENTEX(prim->flags)) && video_config.filter)
381
381
                {
382
 
                        SDL_SetTextureScaleMode(texture->texture_id,  SDL_SCALEMODE_BEST);
 
382
                        SDL_SetTextureScaleMode(texture->texture_id,  DRAW2_SCALEMODE_BEST);
383
383
                }
384
384
                else
385
385
                {
386
 
                        SDL_SetTextureScaleMode(texture->texture_id,  SDL_SCALEMODE_NONE);
 
386
                        SDL_SetTextureScaleMode(texture->texture_id,  DRAW2_SCALEMODE_NEAREST);
387
387
                }
388
388
#endif
389
389
                SDL_SetTextureBlendMode(texture_id, texture->sdl_blendmode);
497
497
        callbacks->exit = draw13_exit;
498
498
        callbacks->attach = draw13_attach;
499
499
 
500
 
        mame_printf_verbose("Using SDL native texturing driver (SDL 1.3+)\n");
 
500
        mame_printf_verbose("Using SDL native texturing driver (SDL 2.0+)\n");
501
501
 
502
502
        expand_copy_info(blit_info_default);
503
503
        //FIXME: -opengl16 should be -opengl -prefer16bpp
577
577
                        SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_FULLSCREEN : SDL_WINDOW_RESIZABLE);
578
578
 
579
579
        // create the SDL window
 
580
        window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
 
581
                        width, height, sdl->extra_flags);
 
582
 
580
583
        if (window->fullscreen && video_config.switchres)
581
584
        {
582
585
                SDL_DisplayMode mode;
610
613
        else
611
614
                SDL_SetWindowDisplayMode(window->sdl_window, NULL);     // Use desktop
612
615
 
613
 
        window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
614
 
                        width, height, sdl->extra_flags);
615
 
 
616
616
        // create renderer
617
617
 
618
618
        if (video_config.waitvsync)
619
 
                sdl->sdl_renderer = SDL_CreateRenderer(window->sdl_window, -1, /*SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTDISCARD | */SDL_RENDERER_PRESENTVSYNC);
 
619
                sdl->sdl_renderer = SDL_CreateRenderer(window->sdl_window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED);
620
620
        else
621
 
                sdl->sdl_renderer = SDL_CreateRenderer(window->sdl_window, -1, /*SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTDISCARD*/ 0);
 
621
                sdl->sdl_renderer = SDL_CreateRenderer(window->sdl_window, -1, SDL_RENDERER_ACCELERATED);
622
622
 
623
623
        if (!sdl->sdl_renderer)
624
624
        {
721
721
                SDL_SetWindowSize(window->sdl_window, sdl->resize_width, sdl->resize_height);
722
722
                SDL_GetWindowSize(window->sdl_window, &window->width, &window->height);
723
723
                sdl->resize_pending = 0;
 
724
                SDL_RenderSetViewport(sdl->sdl_renderer, NULL);
724
725
        }
725
726
 
726
727
    //SDL_SelectRenderer(window->sdl_window);