X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Fvideo.c;h=5408b56e3cbe9bbb0aad04dff8efd01a1907efcd;hb=b45391e1bbca0b04ffb2114409381d18627fa688;hp=2c38533df60b4ec1797b37479f738c5895a70826;hpb=a6f11cb266052c58ae7e2d6d6e8abd34a9e93214;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/video.c b/AcessNative/acesskernel_src/video.c index 2c38533d..5408b56e 100644 --- a/AcessNative/acesskernel_src/video.c +++ b/AcessNative/acesskernel_src/video.c @@ -9,13 +9,13 @@ #include #include #include -#include +#include #include "ui.h" // === PROTOTYPES === int Video_Install(char **Arguments); Uint64 Video_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); -Uint64 Video_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer); +Uint64 Video_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer); int Video_IOCtl(tVFS_Node *Node, int ID, void *Data); // --- 2D Acceleration Functions -- void Video_2D_Fill(void *Ent, Uint16 X, Uint16 Y, Uint16 W, Uint16 H, Uint32 Colour); @@ -23,13 +23,14 @@ void Video_2D_Blit(void *Ent, Uint16 DstX, Uint16 DstY, Uint16 SrcX, Uint16 SrcY // === GLOBALS === //MODULE_DEFINE(0, VERSION, NativeVideo, Video_Install, NULL, NULL); -tDevFS_Driver gVideo_DriverStruct = { - NULL, "NativeVideo", - { +tVFS_NodeType gVideo_NodeType = { .Read = Video_Read, .Write = Video_Write, .IOCtl = Video_IOCtl - } +}; +tDevFS_Driver gVideo_DriverStruct = { + NULL, "NativeVideo", + {.Type = &gVideo_NodeType} }; int giVideo_DriverID; int giVideo_CurrentFormat; @@ -62,7 +63,7 @@ Uint64 Video_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) /** * \brief Write to the framebuffer */ -Uint64 Video_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) +Uint64 Video_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, const void *Buffer) { int i; ENTER("pNode XOffset XLength pBuffer", Node, Offset, Length, Buffer); @@ -76,7 +77,7 @@ Uint64 Video_Write(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) { case VIDEO_BUFFMT_TEXT: { - tVT_Char *chars = Buffer; + const tVT_Char *chars = Buffer; // int pitch = giUI_Pitch; int widthInChars = giUI_Width/giVT_CharWidth; int heightInChars = giUI_Height/giVT_CharHeight; @@ -294,9 +295,6 @@ int Video_IOCtl(tVFS_Node *Node, int ID, void *Data) //Log_Debug("VESA", "Cursor position (%i,%i) Timer %i", giVesaCursorX, giVesaCursorY, giVesaCursorTimer); return 0; #endif - - case VIDEO_IOCTL_REQLFB: // Request Linear Framebuffer - return 0; } return 0; }