Update region width and height when receiving screen coords to avoid client-side bugs

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 3 years ago
parent 99d410f43e
commit 5593a5c31c
  1. BIN
      bin/SigShare.jar
  2. 3
      src/sig/SigShare.java

Binary file not shown.

@ -199,6 +199,9 @@ public class SigShare {
SCREEN_WIDTH=Integer.parseInt(split[1]); SCREEN_WIDTH=Integer.parseInt(split[1]);
SCREEN_HEIGHT=Integer.parseInt(split[2]); SCREEN_HEIGHT=Integer.parseInt(split[2]);
img = new int[SCREEN_WIDTH*SCREEN_HEIGHT]; //Store the number of changes in the last 8 bits of ints. Use 2 ints per section, meaning an 8x8 section uses 128 integers to store 64 values.
REGION_WIDTH = SCREEN_WIDTH/REGION_X_COUNT;
REGION_HEIGHT = SCREEN_HEIGHT/REGION_Y_COUNT;
p.init(SCREEN_WIDTH,SCREEN_HEIGHT); p.init(SCREEN_WIDTH,SCREEN_HEIGHT);
f.add(p); f.add(p);

Loading…
Cancel
Save