mirror of
https://github.com/Pecusx/libretro-atari800.git
synced 2026-05-21 06:39:36 +02:00
Added VKbd opacity witch switch.
This commit is contained in:
+11
-4
@@ -8,15 +8,22 @@
|
||||
#include "libretro-core.h"
|
||||
|
||||
extern int VIRTUAL_WIDTH;
|
||||
extern int VKBD_OPACITY;
|
||||
|
||||
unsigned Opacity(unsigned color1, unsigned color2){
|
||||
|
||||
unsigned r,g,b;
|
||||
|
||||
r=(R_RGB565(color1)/2)+(R_RGB565(color2)/2);
|
||||
g=(G_RGB565(color1)/2)+(G_RGB565(color2)/2);
|
||||
b=(B_RGB565(color1)/2)+(B_RGB565(color2)/2);
|
||||
return RGB565(r,g,b);
|
||||
if (VKBD_OPACITY==1){
|
||||
r=(R_RGB565(color1)/2)+(R_RGB565(color2)/2);
|
||||
g=(G_RGB565(color1)/2)+(G_RGB565(color2)/2);
|
||||
b=(B_RGB565(color1)/2)+(B_RGB565(color2)/2);
|
||||
return RGB565(r,g,b);
|
||||
}
|
||||
else
|
||||
{
|
||||
return color2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user