| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/Main/renderer/lnxscreenmode.h $ |
| 21 | * $Revision: 1.3 $ |
| 22 | * $Date: 2004/02/09 04:14:52 $ |
| 23 | * $Author: kevinb $ |
| 24 | * |
| 25 | * |
| 26 | * |
| 27 | * $Log: lnxscreenmode.h,v $ |
| 28 | * Revision 1.3 2004/02/09 04:14:52 kevinb |
| 29 | * Added newlines to all headers to reduce number of warnings printed |
| 30 | * |
| 31 | * Made some small changes to get everything compiling. |
| 32 | * |
| 33 | * All Ready to merge the 1.5 tree. |
| 34 | * |
| 35 | * Revision 1.2 2000/04/28 20:25:51 icculus |
| 36 | * Updates, cleanups, and SDLification. |
| 37 | * |
| 38 | * Revision 1.1.1.1 2000/04/18 00:00:49 icculus |
| 39 | * initial checkin |
| 40 | * |
| 41 | * |
| 42 | * 3 9/06/99 9:21p Jeff |
| 43 | * lock video mode switching, don't set viewport when restoring (causing a |
| 44 | * bunch of screen garbage) |
| 45 | * |
| 46 | * 2 9/05/99 9:41p Jeff |
| 47 | * first checkin of Linux Screen manager |
| 48 | * |
| 49 | * $NoKeywords: $ |
| 50 | */ |
| 51 | |
| 52 | #ifndef __LNXVIDEOMODE_H__ |
| 53 | #define __LNXVIDEOMODE_H__cxx . . $ `lib/lnxscreenmode.h:53:9`! |
| 54 | |
| 55 | #if defined(POSIXcxx . . $ `<built-in>:478:9`!) |
| 56 | #include "linux_fix.h"cxx . . $ `<file>/linux/linux_fix.h`/ |
| 57 | #endif |
| 58 | #include <SDL.h> |
| 59 | |
| 60 | #define MODE_OKcxx . . $ `lib/lnxscreenmode.h:60:9`! 0 |
| 61 | #define MODE_HSYNCcxx . . $ `lib/lnxscreenmode.h:61:9`! 1 /* hsync out of range */ |
| 62 | #define MODE_VSYNCcxx . . $ `lib/lnxscreenmode.h:62:9`! 2 /* vsync out of range */ |
| 63 | #define MODE_BADcxx . . $ `lib/lnxscreenmode.h:63:9`! 255 /* unspecified reason */ |
| 64 | |
| 65 | class CLnxVideoModescxx . . $ CLnxVideoModes# { |
| 66 | public: |
| 67 | CLnxVideoModescxx . . $ CLnxVideoModes#CLnxVideoModes(49f6e7a06ebc5aa8).(); |
| 68 | ~cxx . . $ CLnxVideoModes#`~CLnxVideoModes`(ced63f7c635d850d).CLnxVideoModescxx . . $ CLnxVideoModes#(); |
| 69 | |
| 70 | bool Initcxx . . $ CLnxVideoModes#Init(c9857a73d68e59ba).(void); // Display *dpy,int screen); |
| 71 | void RestoreVideoModecxx . . $ CLnxVideoModes#RestoreVideoMode(49f6e7a06ebc5aa8).(void); |
| 72 | |
| 73 | // bool QueryExtension(Display *dpy); |
| 74 | // void GetModeLine(Display *dpy,int screen,int *dotclock,XF86VidModeModeLine *modeline); |
| 75 | |
| 76 | bool SwitchResolutioncxx . . $ CLnxVideoModes#SwitchResolution(cf9ef193275fa6d8).(int width, int height); |
| 77 | void Lockcxx . . $ CLnxVideoModes#Lock(b45ddcbc8423892c).(bool lock); |
| 78 | |
| 79 | SDL_Rect **getModescxx . . $ CLnxVideoModes#getModes(549708f5c6c417b0).(void) { return m_ModeInfoListcxx . . $ CLnxVideoModes#m_ModeInfoList.; } |
| 80 | Uint32cxx . . $ Uint32# getSDLFlagscxx . . $ CLnxVideoModes#getSDLFlags(db52760e79bf9054).(void) { return (sdlflagscxx . . $ CLnxVideoModes#sdlflags.); } |
| 81 | |
| 82 | private: |
| 83 | // bool SwitchToMode(XF86VidModeModeInfo *mode); |
| 84 | bool LoadLibrariescxx . . $ CLnxVideoModes#LoadLibraries(c9857a73d68e59ba).(void); |
| 85 | |
| 86 | bool m_Initedcxx . . $ CLnxVideoModes#m_Inited.; |
| 87 | bool m_VideoResolutionChangedcxx . . $ CLnxVideoModes#m_VideoResolutionChanged.; |
| 88 | int m_NumVideoModescxx . . $ CLnxVideoModes#m_NumVideoModes.; |
| 89 | // XF86VidModeModeInfo **m_ModeInfoList; |
| 90 | SDL_Rect **m_ModeInfoListcxx . . $ CLnxVideoModes#m_ModeInfoList.; |
| 91 | Uint32cxx . . $ Uint32# sdlflagscxx . . $ CLnxVideoModes#sdlflags.; |
| 92 | // Display *m_Display; |
| 93 | // int m_Screen; |
| 94 | }; |
| 95 | |
| 96 | extern CLnxVideoModescxx . . $ CLnxVideoModes# LinuxVideoModecxx . . $ LinuxVideoMode.; |
| 97 | |
| 98 | #endif |