mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Move fullscreen display resolution control to the GUI with the rest of the fullscreen toggling code. This removes redundancy of code that was in several places through the various video plugins. Unfortunately it means the fullscreen resolution setting also had to be moved to the main configuration dialog. I am sure that will meet some resistance.
Also added a window size setting for windowed mode. Also pulled some X11 specific code out into a separate file. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5395 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
80
Source/Core/DolphinWX/Src/X11Utils.h
Normal file
80
Source/Core/DolphinWX/Src/X11Utils.h
Normal file
@ -0,0 +1,80 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __X11UTILS_H_
|
||||
#define __X11UTILS_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
#include <wx/wx.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#endif
|
||||
|
||||
#include "Core.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
// EWMH state actions, see
|
||||
// http://freedesktop.org/wiki/Specifications/wm-spec?action=show&redirect=Standards%2Fwm-spec
|
||||
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
|
||||
#define _NET_WM_STATE_ADD 1 /* add/set property */
|
||||
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
|
||||
|
||||
namespace X11Utils
|
||||
{
|
||||
|
||||
void SendClientEvent(const char *message,
|
||||
int data1, int data2, int data3, int data4);
|
||||
void SendKeyEvent(int key);
|
||||
void EWMH_Fullscreen(int action);
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
Window XWindowFromHandle(void *Handle);
|
||||
Display *XDisplayFromHandle(void *Handle);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
class XRRConfiguration
|
||||
{
|
||||
public:
|
||||
XRRConfiguration(Display *_dpy, Window _win);
|
||||
~XRRConfiguration();
|
||||
|
||||
void Update();
|
||||
void ToggleDisplayMode(bool bFullscreen);
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
void AddResolutions(wxArrayString& arrayStringFor_FullscreenResolution);
|
||||
#endif
|
||||
|
||||
private:
|
||||
Display *dpy;
|
||||
Window win;
|
||||
XRRScreenConfiguration *screenConfig;
|
||||
Rotation screenRotation;
|
||||
int deskSize, fullSize;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user