Make middle click work with photon map
This commit is contained in:
parent
9a3836879e
commit
892a2b11c7
@ -2769,10 +2769,12 @@ int main(int argc, char *argv[])
|
|||||||
//sample
|
//sample
|
||||||
else if (((sdl_mod & (KMOD_LALT|KMOD_RALT)) && !(sdl_mod & (KMOD_SHIFT))) || b==SDL_BUTTON_MIDDLE)
|
else if (((sdl_mod & (KMOD_LALT|KMOD_RALT)) && !(sdl_mod & (KMOD_SHIFT))) || b==SDL_BUTTON_MIDDLE)
|
||||||
{
|
{
|
||||||
if (y>0 && y<sdl_scale*YRES && x>0 && x<sdl_scale*XRES)
|
if (y>=0 && y<YRES && x>=0 && x<XRES)
|
||||||
{
|
{
|
||||||
int cr;
|
int cr;
|
||||||
cr = pmap[y][x];
|
cr = pmap[y][x];
|
||||||
|
if ((cr>>8)>=NPART || !cr)
|
||||||
|
cr = photons[y][x];
|
||||||
if (!((cr>>8)>=NPART || !cr))
|
if (!((cr>>8)>=NPART || !cr))
|
||||||
{
|
{
|
||||||
c = sl = cr&0xFF;
|
c = sl = cr&0xFF;
|
||||||
|
Loading…
Reference in New Issue
Block a user