Previous 199869 Revisions Next

r34026 Tuesday 23rd December, 2014 at 04:38:25 UTC by R. Belmont
SDL2: Improved Alt-Enter functionality (now works on all screens at once) and prefer upper-left placement of windowed mode windows. [R. Belmont]
[src/osd/sdl]draw13.c drawogl.c video.c video.h

trunk/src/osd/sdl/draw13.c
r242537r242538
555555         SDL_WINDOW_BORDERLESS | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_FULLSCREEN : SDL_WINDOW_RESIZABLE);
556556
557557   // create the SDL window
558   window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
558   window->sdl_window = SDL_CreateWindow(window->title, window->monitor->monitor_x, 0,
559559         width, height, sdl->extra_flags);
560560
561561   if (window->fullscreen && video_config.switchres)
trunk/src/osd/sdl/drawogl.c
r242537r242538
510510   //load_gl_lib(window->machine());
511511
512512   // create the SDL window
513   window->sdl_window = SDL_CreateWindow(window->title, SDL_WINDOWPOS_UNDEFINED_DISPLAY(window->monitor->handle), SDL_WINDOWPOS_UNDEFINED,
513   window->sdl_window = SDL_CreateWindow(window->title, window->monitor->monitor_x, 0,
514514         width, height, sdl->extra_flags);
515515
516516   if  (!window->sdl_window )
trunk/src/osd/sdl/video.c
r242537r242538
437437
438438   #if (SDLMAME_SDL2)
439439   {
440      int i;
440      int i, monx = 0;
441441
442442      osd_printf_verbose("Enter init_monitors\n");
443443
r242537r242538
456456         monitor->monitor_height = dmode.h;
457457         monitor->center_width = dmode.w;
458458         monitor->center_height = dmode.h;
459         monitor->monitor_x = monx;
459460         monitor->handle = i;
460461         // guess the aspect ratio assuming square pixels
461462         monitor->aspect = (float)(dmode.w) / (float)(dmode.h);
462463         osd_printf_verbose("Adding monitor %s (%d x %d)\n", monitor->monitor_device, dmode.w, dmode.h);
463464
465         monx += dmode.w;
466
464467         // save the primary monitor handle
465468         if (i == 0)
466469            primary_monitor = monitor;
r242537r242538
560563
561564   // check for toggling fullscreen mode
562565   if (ui_input_pressed(machine, IPT_OSD_1))
563      sdlwindow_toggle_full_screen(machine, window);
566   {
567      sdl_window_info *curwin = sdl_window_list;
564568
569      while (curwin != (sdl_window_info *)NULL)
570      {
571         sdlwindow_toggle_full_screen(machine, curwin);
572         curwin = curwin->next;
573      }
574   }
575
565576   if (ui_input_pressed(machine, IPT_OSD_2))
566577   {
567578      //FIXME: on a per window basis
trunk/src/osd/sdl/video.h
r242537r242538
7070   float               aspect;                 // computed/configured aspect ratio of the physical device
7171   int                 center_width;           // width of first physical screen for centering
7272   int                 center_height;          // height of first physical screen for centering
73   int               monitor_x;            // X position of this monitor in virtual desktop space (SDL virtual space has them all horizontally stacked, not real geometry)
7374};
7475
7576


Previous 199869 Revisions Next


© 1997-2024 The MAME Team