Changing boolean parameter in a function

Why is this not working? I get error:statement has no effect for "fullscreen == true;"

1
2
3
4
5
6
7
8
      void  SimpleHandler::OnFullscreenModeChange(CefRefPtr<CefBrowser> browser, bool fullscreen ){
            if(fullscreen != true){
         
         fullscreen == true;
             
            }
           
        }   
fullscreen == true;
Should be :
fullscreen = true;
Your statement has no effect just like what your compiler is trying to warn you.
thank you
This compiles and run but does not change the behavior. I thnk I may be using it in the framework in the wrong way.

1
2
3
4
5
6
7
8
9
10
11
12
13
void SimpleHandler::OnFullscreenModeChange(CefRefPtr<CefBrowser> browser, bool fullscreen) {
    // CEF_REQUIRE_UI_THREAD(); 
    LOG(INFO) << " OnFullscreenModeChange " << "fullscreenchanged" ;
        
    if (fullscreen != true){
   
    fullscreen = true;
    DLOG(INFO) << "fullscreen = " << fullscreen ;
    
 // return ;

      }
}


This code is sufficient to change the value of fullscreen to true correct?
Last edited on
Topic archived. No new replies allowed.