]> git.sesse.net Git - bmusb/commitdiff
Add a way to get the current video mode.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 4 Mar 2016 00:24:22 +0000 (01:24 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 4 Mar 2016 00:24:22 +0000 (01:24 +0100)
bmusb.cpp
bmusb.h

index b400ac732ce8ae02a788aef8161695085e4a9bf0..3d2c9f018488e202dff12e9439ebe8be665fa376 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1240,6 +1240,11 @@ map<uint32_t, VideoMode> BMUSBCapture::get_available_video_modes() const
        return {{ 0, auto_mode }};
 }
 
+uint32_t BMUSBCapture::get_current_video_mode() const
+{
+       return 0;  // Matches get_available_video_modes().
+}
+
 void BMUSBCapture::set_video_mode(uint32_t video_mode_id)
 {
        assert(video_mode_id == 0);  // Matches get_available_video_modes().
diff --git a/bmusb.h b/bmusb.h
index e905e05afc82496abca75a5ef22083826f805125..9ba27bcc111234040d807bbcd0fafbb3f3cd9275 100644 (file)
--- a/bmusb.h
+++ b/bmusb.h
@@ -114,7 +114,7 @@ class CaptureInterface {
        virtual ~CaptureInterface() {}
 
        virtual std::map<uint32_t, VideoMode> get_available_video_modes() const = 0;
-
+       virtual uint32_t get_current_video_mode() const = 0;
        virtual void set_video_mode(uint32_t video_mode_id) = 0;
 
        // Does not take ownership.
@@ -153,7 +153,7 @@ class BMUSBCapture : public CaptureInterface {
        ~BMUSBCapture() {}
 
        std::map<uint32_t, VideoMode> get_available_video_modes() const override;
-
+       uint32_t get_current_video_mode() const override;
        void set_video_mode(uint32_t video_mode_id) override;
 
        // Does not take ownership.