mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			500 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			500 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
| import sv, SV
 | |
| import gl, DEVICE
 | |
| 
 | |
| def main():
 | |
| 	gl.foreground()
 | |
| 	gl.prefsize(SV.PAL_XMAX, SV.PAL_YMAX)
 | |
| 	win = gl.winopen('video test')
 | |
| 	v = sv.OpenVideo()
 | |
| 	params = [SV.VIDEO_MODE, SV.COMP, SV.BROADCAST, SV.PAL]
 | |
| 	v.SetParam(params)
 | |
| 	v.BindGLWindow(win, SV.IN_REPLACE)
 | |
| 	gl.qdevice(DEVICE.ESCKEY)
 | |
| 	gl.qdevice(DEVICE.WINQUIT)
 | |
| 	gl.qdevice(DEVICE.WINSHUT)
 | |
| 	while 1:
 | |
| 		dev, val = gl.qread()
 | |
| 		if dev in (DEVICE.ESCKEY, DEVICE.WINSHUT, DEVICE.WINQUIT):
 | |
| 			v.CloseVideo()
 | |
| 			gl.winclose(win)
 | |
| 			return
 | |
| 
 | |
| main()
 | 
