mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
minor lint fixes.
This commit is contained in:
parent
47689d5372
commit
51d061e9aa
@ -77,17 +77,17 @@ func (h *RoomHandler) screenConfigurationsList(w http.ResponseWriter, r *http.Re
|
||||
}
|
||||
|
||||
func (h *RoomHandler) screenShotGet(w http.ResponseWriter, r *http.Request) {
|
||||
var options *jpeg.Options
|
||||
if quality, err := strconv.Atoi(r.URL.Query().Get("quality")); err == nil {
|
||||
options = &jpeg.Options{ quality }
|
||||
} else {
|
||||
options = &jpeg.Options{ 90 }
|
||||
quality, err := strconv.Atoi(r.URL.Query().Get("quality"))
|
||||
if err != nil {
|
||||
quality = 90
|
||||
}
|
||||
|
||||
img := h.desktop.GetScreenshotImage()
|
||||
out := new(bytes.Buffer)
|
||||
err := jpeg.Encode(out, img, options)
|
||||
if err != nil {
|
||||
|
||||
if err := jpeg.Encode(out, img, &jpeg.Options{
|
||||
Quality: quality,
|
||||
}); err != nil {
|
||||
utils.HttpInternalServerError(w, err)
|
||||
return
|
||||
}
|
||||
|
@ -229,8 +229,7 @@ func GetCursorImage() *types.CursorImage {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
var cur *C.XFixesCursorImage
|
||||
cur = C.XGetCursorImage()
|
||||
cur := C.XGetCursorImage()
|
||||
defer C.XFree(unsafe.Pointer(cur))
|
||||
|
||||
width := uint16(cur.width)
|
||||
|
Loading…
Reference in New Issue
Block a user