Atlas - SDL_dosvideo.h
Home / ext / SDL / src / video / dos Lines: 1 | Size: 3196 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Simple DirectMedia Layer 3 Copyright (C) 1997-2026 Sam Lantinga <[email protected]> 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21 22#ifndef SDL_dosvideo_h 23#define SDL_dosvideo_h 24 25#include "../../core/dos/SDL_dos.h" 26#include "../SDL_sysvideo.h" 27#include "SDL_internal.h" 28 29struct SDL_DisplayModeData 30{ 31 // we can add more fields to this, if we want them, later. 32 Uint16 mode_id; 33 Uint16 attributes; 34 Uint16 pitch; 35 Uint16 w; 36 Uint16 h; 37 Uint8 num_planes; 38 Uint8 bpp; 39 Uint8 memory_model; 40 Uint8 num_image_pages; 41 Uint8 red_mask_size; 42 Uint8 red_mask_pos; 43 Uint8 green_mask_size; 44 Uint8 green_mask_pos; 45 Uint8 blue_mask_size; 46 Uint8 blue_mask_pos; 47 Uint32 physical_base_addr; 48 49 // VBE 1.2 banked framebuffer fields (used when LFB is not available) 50 bool has_lfb; // true if linear framebuffer is available (VBE 2.0+) 51 Uint16 win_granularity; // bank positioning granularity in KB 52 Uint16 win_size; // window size in KB (typically 64) 53 Uint16 win_a_segment; // real-mode segment of window A (typically 0xA000) 54 Uint32 win_func_ptr; // real-mode far pointer to bank-switch function 55 Uint8 win_a_attributes; // window A capabilities 56}; 57 58struct SDL_VideoData 59{ 60 __dpmi_meminfo mapping; // video memory mapping. 61 SDL_DisplayMode current_mode; 62 DOS_InterruptHook keyboard_interrupt_hook; 63 Uint32 palette_version; // tracks SDL_Palette::version to detect changes 64 Uint16 original_vbe_mode; // VBE mode number at startup 65 void *vbe_state_buffer; // saved VBE state (from VBE 0x4F04) 66 Uint32 vbe_state_buffer_size; // size of the state buffer 67 68 // Mouse sensitivity (mickeys per pixel), queried from INT 33h function 0x1B 69 float mickeys_per_hpixel; // horizontal mickeys per pixel (default: 8) 70 float mickeys_per_vpixel; // vertical mickeys per pixel (default: 16) 71 72 // Page-flipping (double-buffering) state 73 int current_page; // 0 or 1: which page is currently displayed 74 Uint32 page_offset[2]; // byte offset of each page within video memory 75 bool page_flip_available; // true if mode supports double-buffering 76 bool banked_mode; // true if current mode uses banked (not LFB) access 77}; 78 79struct SDL_DisplayData 80{ 81 int unused; // for now 82}; 83 84struct SDL_WindowData 85{ 86 int framebuffer_vsync; 87}; 88 89#endif // SDL_dosvideo_h 90[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.