Restructure thread function.
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
54dff58f17
commit
e826d71efc
@ -693,13 +693,13 @@ public class ArcadeReader {
|
|||||||
.replaceAll(Pattern.quote("="),"");
|
.replaceAll(Pattern.quote("="),"");
|
||||||
}
|
}
|
||||||
public static void submitToDatabase(Path p) {
|
public static void submitToDatabase(Path p) {
|
||||||
|
Thread t = new Thread(){
|
||||||
|
public void run() {
|
||||||
//First we read and interpret what this image is.
|
//First we read and interpret what this image is.
|
||||||
BufferedImage img;
|
BufferedImage img;
|
||||||
try {
|
try {
|
||||||
img = ImageIO.read(p.toFile());
|
img = ImageIO.read(p.toFile());
|
||||||
final Reader newImg = interpret(img);
|
final Reader newImg = interpret(img);
|
||||||
Thread t = new Thread(){
|
|
||||||
public void run() {
|
|
||||||
newImg.result_screenshot=p;
|
newImg.result_screenshot=p;
|
||||||
//Path getGamePath = gamePath(newImg);
|
//Path getGamePath = gamePath(newImg);
|
||||||
newImg.interpretBoxes(p);
|
newImg.interpretBoxes(p);
|
||||||
@ -763,11 +763,12 @@ public class ArcadeReader {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
} catch (IOException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
t.start();
|
t.start();
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user