From f6e5d72e3c7d18496e00426d2cc65230ca2efd46 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Sun, 3 Apr 2022 16:41:57 +0200 Subject: [PATCH] videoctrl: fix surface size. --- devices/video/displayid.h | 17 ++++++++++++++++- devices/video/videoctrl.cpp | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/devices/video/displayid.h b/devices/video/displayid.h index b756149..c518dce 100644 --- a/devices/video/displayid.h +++ b/devices/video/displayid.h @@ -81,6 +81,7 @@ private: uint8_t reg_addr; /* current register address */ uint8_t* data_ptr; /* ptr to data byte to be transferred next */ +/* uint8_t edid[128] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x06, 0x10, 0x02, 0x9d, 0x01, 0x01, 0x01, 0x01, 0x08, 0x09, 0x01, 0x01, 0x68, 0x20, 0x18, 0x28, 0xe8, 0x04, 0x89, 0xa0, 0x57, 0x4a, @@ -90,7 +91,21 @@ private: 0x32, 0x62, 0xb0, 0x32, 0x40, 0x40, 0xc2, 0x13, 0x00, 0x38, 0xea, 0x10, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x30, 0xa0, 0x1e, 0x55, 0x10, 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x44, - 0x73, 0x70, 0x6c, 0x79, 0x31, 0x37, 0x00, 0x19}; + 0x73, 0x70, 0x6c, 0x79, 0x31, 0x37, 0x00, 0x19};*/ + + uint8_t edid[128] = { + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x34, 0x38, 0x09, 0x06, + 0x1b, 0x06, 0x00, 0x00, 0x03, 0x0c, 0x01, 0x02, 0x68, 0x1e, 0x17, 0x78, + 0xea, 0x6d, 0x8c, 0x98, 0x59, 0x50, 0x93, 0x26, 0x20, 0x4c, 0x52, 0xbf, + 0xee, 0x00, 0x31, 0x4f, 0x45, 0x4f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xc3, 0x1e, 0x00, 0x20, 0x41, 0x00, + 0x20, 0x30, 0x10, 0x60, 0x13, 0x00, 0x30, 0xe4, 0x10, 0x00, 0x00, 0x1e, + 0x00, 0x00, 0x00, 0xfd, 0x00, 0x37, 0x4b, 0x1f, 0x3c, 0x08, 0x00, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x31, + 0x30, 0x20, 0x31, 0x35, 0x20, 0x34, 0x35, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x00, 0xfe, 0x00, 0x4d, 0x61, 0x78, 0x64, 0x61, 0x74, 0x61, + 0x31, 0x30, 0x31, 0x35, 0x34, 0x35, 0x00, 0xf4 + }; /* More EDID: 00ff ffff ffff ff00 5a63 5151 0341 0000 diff --git a/devices/video/videoctrl.cpp b/devices/video/videoctrl.cpp index d8db848..1c5ea0c 100644 --- a/devices/video/videoctrl.cpp +++ b/devices/video/videoctrl.cpp @@ -69,7 +69,7 @@ VideoCtrlBase::VideoCtrlBase(int width, int height) this->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, - 640, 480 + width, height ); if (this->disp_texture == NULL) {