Jenson Button considered leaving Formula 1 this year as McLaren endured their worst season.
However, the former world champion decided to continue after talks with boss Ron Dennis and other key members of the team.
"Last year I wasn't sure If I'd be racing and it wasn't my choice," the 35-year-old British driver explained.
"This year it was totally my choice and there was a moment where I thought 'I am not sure I want to do this anymore.
“Obviously if we are where we are right now next year it is not going to be that enjoyable."
McLaren, the second most successful team after Ferrari in Formula 1 in terms of race wins, finished ninth of 10 this season.
They have not won a race since 2012, with 2009 champion Button the last to do so.
Their new partnership with Honda has been plagued by unreliability and a lack of performance that has seen the Briton and Spanish team mate Fernando Alonso languishing near the back of the pack.
There was considerable speculation earlier in the year that Button would announce his retirement but instead the most experienced driver on the grid, who made his debut in 2000, signed up for another season.
"I spent a lot of time with the engineers and I spoke more with Ron in the two months when I was trying to decide what to do next year than I have in my whole time at McLaren," said Button.
"So that got me excited, that got me pumped for next year knowing that there are big improvements on the horizon, and we need them."
Alonso has two more years on his contract but Dennis told reporters last month that a possible sabbatical had been discussed if the car remained uncompetitive, though the Spaniard subsequently ruled that out.