21 |
|
#ifndef VIDEO_VOSF_H |
22 |
|
#define VIDEO_VOSF_H |
23 |
|
|
24 |
< |
// Note: this file is #include'd in video_x.cpp |
24 |
> |
// Note: this file must be #include'd only in video_x.cpp |
25 |
|
#ifdef ENABLE_VOSF |
26 |
|
|
27 |
|
#include <fcntl.h> |
200 |
|
* Initialize the VOSF system (mainBuffer structure, SIGSEGV handler) |
201 |
|
*/ |
202 |
|
|
203 |
– |
#if !EMULATED_PPC && !POWERPC_ROM |
204 |
– |
static |
205 |
– |
#endif |
206 |
– |
bool Screen_fault_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction); |
207 |
– |
|
203 |
|
static bool video_vosf_init(X11_MONITOR_INIT) |
204 |
|
{ |
205 |
|
VIDEO_MODE_INIT; |
255 |
|
if (vm_protect((char *)mainBuffer.memStart, mainBuffer.memLength, VM_PAGE_READ) != 0) |
256 |
|
return false; |
257 |
|
|
263 |
– |
#if !EMULATED_PPC && !POWERPC_ROM |
264 |
– |
// Initialize the handler for SIGSEGV |
265 |
– |
if (!sigsegv_install_handler(Screen_fault_handler)) |
266 |
– |
return false; |
267 |
– |
#endif |
268 |
– |
|
258 |
|
// The frame buffer is sane, i.e. there is no write to it yet |
259 |
|
mainBuffer.dirty = false; |
260 |
|
return true; |