Mercurial > sdl-ios-xcode
comparison src/video/photon/SDL_ph_video.h @ 663:8bedd6d61642
Date: Sat, 2 Aug 2003 16:22:51 +0300
From: "Mike Gorchak"
Subject: New patches for QNX6
Here my patches for the SDL/QNX:
QNXSDL.diff - diff to non-QNX related sources:
- updated BUGS file, I think QNX6 is now will be officially supported
- configure.in - added shared library support for QNX, and removed dependency between the ALSA and QNX6.
- SDL_audio.c - added QNX NTO sound bootstrap insted of ALSA's.
- SDL_sysaudio.h - the same.
- SDL_nto_audio.c - the same.
- SDL_video.c - right now, QNX doesn't offer any method to obtain pointers to the OpenGL functions by function name, so they must be hardcoded in library, otherwise OpenGL will not be supported.
- testsprite.c - fixed: do not draw vertical red line if we are in non-double-buffered mode.
sdlqnxph.tar.gz - archive of the ./src/video/photon/* . Too many changes in code to make diffs :) :
+ Added stub for support hide/unhide window event
+ Added full YUV overlays support.
+ Added window maximize support.
+ Added mouse wheel events.
+ Added support for some specific key codes in Unicode mode (like ESC).
+ Added more checks to the all memory allocation code.
+ Added SDL_DOUBLEBUF support in all fullscreen modes.
+ Added fallback to window mode, if desired fullscreen mode is not supported.
+ Added stub support for the GL_LoadLibrary and GL_GetProcAddress functions.
+ Added resizable window support without caption.
! Fixed bug in the Ph_EV_EXPOSE event handler, when rectangles to update is 0 and when width or height of the rectangle is 0.
! Fixed bug in the event handler code. Events has not been passed to the window widget handler.
! Fixed codes for Win keys (Super/Hyper/Menu).
! Fixed memory leak, when deallocation palette.
! Fixed palette emulation code bugs.
! Fixed fullscreen and hwsurface handling.
! Fixed CLOSE button bug. First event was passed to the handler, but second terminated the application. Now all events passed to the application correctly.
- Removed all printfs in code, now SDL_SetError used instead of them.
- Disabled ToggleFullScreen function.
README.QNX - updated README.QNX file. Added much more issues.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 04 Aug 2003 00:52:42 +0000 |
parents | 8e3ce997621c |
children | 04dd6c6d7c30 |
comparison
equal
deleted
inserted
replaced
662:66c02f83f5bf | 663:8bedd6d61642 |
---|---|
18 | 18 |
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 | 22 |
23 #ifndef _SDL_ph_video_h | 23 #ifndef __SDL_PH_VIDEO_H__ |
24 #define _SDL_ph_video_h | 24 #define __SDL_PH_VIDEO_H__ |
25 | 25 |
26 #include "SDL_mouse.h" | 26 #include "SDL_mouse.h" |
27 #include "SDL_sysvideo.h" | 27 #include "SDL_sysvideo.h" |
28 | 28 |
29 #include "Ph.h" | 29 #include <Ph.h> |
30 #include "Pt.h" | 30 #include <Pt.h> |
31 #include <photon/Pg.h> | 31 #include <photon/Pg.h> |
32 #include <photon/PdDirect.h> | 32 #include <photon/PdDirect.h> |
33 | |
33 #ifdef HAVE_OPENGL | 34 #ifdef HAVE_OPENGL |
34 #include <photon/PdGL.h> | 35 #include <photon/PdGL.h> |
35 #endif /* HAVE_OPENGL */ | 36 #endif /* HAVE_OPENGL */ |
36 | 37 |
37 /* Hidden "this" pointer for the video functions */ | 38 /* Hidden "this" pointer for the video functions */ |
38 #define _THIS SDL_VideoDevice *this | 39 #define _THIS SDL_VideoDevice* this |
39 | 40 |
40 #define PH_OGL_MAX_ATTRIBS 32 | 41 #define PH_OGL_MAX_ATTRIBS 32 |
41 | 42 |
42 #define SDLPH_PAL_NONE 0x00000000L | 43 #define SDLPH_PAL_NONE 0x00000000L |
43 #define SDLPH_PAL_EMULATE 0x00000001L | 44 #define SDLPH_PAL_EMULATE 0x00000001L |
44 #define SDLPH_PAL_SYSTEM 0x00000002L | 45 #define SDLPH_PAL_SYSTEM 0x00000002L |
45 | 46 |
46 typedef union vidptr{ | 47 typedef struct |
47 uint8_t* volatile ptr8; | 48 { |
48 uint16_t* volatile ptr16; | |
49 uint32_t* volatile ptr32; | |
50 } VidPtr_t; | |
51 | |
52 typedef struct { | |
53 unsigned char* Y; | 49 unsigned char* Y; |
54 unsigned char* V; | 50 unsigned char* V; |
55 unsigned char* U; | 51 unsigned char* U; |
56 } FRAMEDATA; | 52 } FRAMEDATA; |
53 | |
54 /* Mask values for SDL_ReallocFormat() */ | |
55 struct ColourMasks | |
56 { | |
57 Uint32 red; | |
58 Uint32 green; | |
59 Uint32 blue; | |
60 Uint32 alpha; | |
61 Uint32 bpp; | |
62 }; | |
57 | 63 |
58 /* Private display data */ | 64 /* Private display data */ |
59 struct SDL_PrivateVideoData { | 65 struct SDL_PrivateVideoData { |
60 PgDisplaySettings_t mode_settings; | 66 PgDisplaySettings_t mode_settings; |
61 PtWidget_t *Window; /* used to handle input events */ | 67 PtWidget_t *Window; /* used to handle input events */ |
67 PgColor_t syspalph[_Pg_MAX_PALETTE]; | 73 PgColor_t syspalph[_Pg_MAX_PALETTE]; |
68 | 74 |
69 struct { | 75 struct { |
70 PdDirectContext_t* direct_context; | 76 PdDirectContext_t* direct_context; |
71 PdOffscreenContext_t* offscreen_context; | 77 PdOffscreenContext_t* offscreen_context; |
78 PdOffscreenContext_t* offscreen_backcontext; | |
72 PhDrawContext_t* oldDC; | 79 PhDrawContext_t* oldDC; |
73 VidPtr_t dc_ptr; | 80 uint8_t* dc_ptr; |
74 unsigned char* CurrentFrameData; | 81 unsigned char* CurrentFrameData; |
75 unsigned char* FrameData0; | 82 unsigned char* FrameData0; |
76 unsigned char* FrameData1; | 83 unsigned char* FrameData1; |
77 int current; | 84 int current; |
78 long flags; | 85 long flags; |
83 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */ | 90 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */ |
84 | 91 |
85 int mouse_relative; | 92 int mouse_relative; |
86 WMcursor* BlankCursor; | 93 WMcursor* BlankCursor; |
87 | 94 |
88 int depth; /* current visual depth (not bpp) */ | 95 int depth; /* current visual depth (not bpp) */ |
89 int desktopbpp; /* bpp of desktop at the moment of start */ | 96 int desktopbpp; /* bpp of desktop at the moment of start */ |
90 int desktoppal; /* palette mode emulation or system */ | 97 int desktoppal; /* palette mode emulation or system */ |
91 | 98 |
92 int currently_fullscreen; | 99 int currently_fullscreen; |
100 int currently_hided; /* 1 - window hided (minimazed), 0 - normal */ | |
93 | 101 |
94 PhEvent_t* event; | 102 PhEvent_t* event; |
103 SDL_Overlay* overlay; | |
95 }; | 104 }; |
96 | 105 |
97 #define mode_settings (this->hidden->mode_settings) | 106 #define mode_settings (this->hidden->mode_settings) |
98 #define window (this->hidden->Window) | 107 #define window (this->hidden->Window) |
99 #define oglctx (this->hidden->OGLContext) | 108 #define oglctx (this->hidden->OGLContext) |
104 #define graphics_card_caps (this->hidden->graphics_card_caps) | 113 #define graphics_card_caps (this->hidden->graphics_card_caps) |
105 #define desktopbpp (this->hidden->desktopbpp) | 114 #define desktopbpp (this->hidden->desktopbpp) |
106 #define desktoppal (this->hidden->desktoppal) | 115 #define desktoppal (this->hidden->desktoppal) |
107 #define savedpal (this->hidden->savedpal) | 116 #define savedpal (this->hidden->savedpal) |
108 #define syspalph (this->hidden->syspalph) | 117 #define syspalph (this->hidden->syspalph) |
118 #define currently_fullscreen (this->hidden->currently_fullscreen) | |
119 #define currently_hided (this->hidden->currently_hided) | |
120 #define event (this->hidden->event) | |
121 #define current_overlay (this->hidden->overlay) | |
109 | 122 |
110 /* Old variable names */ | 123 /* Old variable names */ |
111 #define mouse_relative (this->hidden->mouse_relative) | 124 #define mouse_relative (this->hidden->mouse_relative) |
112 #define currently_fullscreen (this->hidden->currently_fullscreen) | |
113 #define event (this->hidden->event) | |
114 #define SDL_BlankCursor (this->hidden->BlankCursor) | 125 #define SDL_BlankCursor (this->hidden->BlankCursor) |
115 | 126 |
116 #endif /* _SDL_x11video_h */ | 127 #endif /* __SDL_PH_VIDEO_H__ */ |