cychiang / webcamstudio

Automatically exported from code.google.com/p/webcamstudio
GNU General Public License v3.0
1 stars 0 forks source link

Desktop video source fails in VMWare environment. #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Adding desktop video source and activating this.
2. Show preview.

What is the expected output? What do you see instead?
Desktop should show in preview.

What version of the product are you using? On what operating system?
0.57a-b
Ubuntu 9-11

Please provide any additional information below.
When the screen resolution is read in the VideoSource the getDevice() returns 
null. This leads to a null exception when the device is used to find out the 
resolution with getSize(). A work around is to test for null value and set the 
resolution to a fixed size. The resolution is needed to keep the VideoSource on 
screen.

Original issue reported on code.google.com by wecks...@gmail.com on 16 Jun 2011 at 9:35

GoogleCodeExporter commented 9 years ago
This issue does not exist in 0.56.

Original comment by wecks...@gmail.com on 17 Jun 2011 at 6:36

GoogleCodeExporter commented 9 years ago
I’ll have a look

Original comment by patrick.balleux on 17 Jun 2011 at 6:48

GoogleCodeExporter commented 9 years ago
This is the first line that fails due to null pointer exception:

46:  int screenwidth = 
java.awt.MouseInfo.getPointerInfo().getDevice().getDisplayMode().getWidth();

Also, correcting myself, getDisplayMode() returns null, not getDevice().

Original comment by wecks...@gmail.com on 17 Jun 2011 at 12:18

GoogleCodeExporter commented 9 years ago
*hack*

int screenwidth = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;
int screenheight = java.awt.Toolkit.getDefaultToolkit().getScreenSize().height;

For systems with one screen this is a solution.

Original comment by wecks...@gmail.com on 17 Jun 2011 at 2:40

GoogleCodeExporter commented 9 years ago
Fixed, thanks for the pointer

Original comment by patrick.balleux on 13 Nov 2011 at 4:05